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

Function nth_value_1

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

Source from the content-addressed store, hash-verified

616
617 #[test]
618 fn nth_value_1() -> Result<()> {
619 let expr = Arc::new(Column::new("c3", 0)) as Arc<dyn PhysicalExpr>;
620 let n_value =
621 Arc::new(Literal::new(ScalarValue::Int32(Some(1)))) as Arc<dyn PhysicalExpr>;
622
623 test_i32_result(
624 NthValue::nth(),
625 PartitionEvaluatorArgs::new(
626 &[expr, n_value],
627 &[Field::new("f", DataType::Int32, true).into()],
628 false,
629 false,
630 ),
631 Int32Array::from(vec![1; 8]),
632 )?;
633 Ok(())
634 }
635
636 #[test]
637 fn nth_value_2() -> Result<()> {

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…