MCPcopy Create free account
hub / github.com/apache/datafusion / nth_value_2

Function nth_value_2

datafusion/functions-window/src/nth_value.rs:637–662  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

635
636 #[test]
637 fn nth_value_2() -> Result<()> {
638 let expr = Arc::new(Column::new("c3", 0)) as Arc<dyn PhysicalExpr>;
639 let n_value =
640 Arc::new(Literal::new(ScalarValue::Int32(Some(2)))) as Arc<dyn PhysicalExpr>;
641
642 test_i32_result(
643 NthValue::nth(),
644 PartitionEvaluatorArgs::new(
645 &[expr, n_value],
646 &[Field::new("f", DataType::Int32, true).into()],
647 false,
648 false,
649 ),
650 Int32Array::from(vec![
651 None,
652 Some(-2),
653 Some(-2),
654 Some(-2),
655 Some(-2),
656 Some(-2),
657 Some(-2),
658 Some(-2),
659 ]),
660 )?;
661 Ok(())
662 }
663}

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
test_i32_resultFunction · 0.70
intoMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…