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

Function select_with_window_exprs

datafusion/core/tests/dataframe/mod.rs:383–400  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

381
382#[tokio::test]
383async fn select_with_window_exprs() -> Result<()> {
384 // build plan using Table API
385 let t = test_table().await?;
386 let first_row = first_value(col("aggregate_test_100.c1"))
387 .partition_by(vec![col("aggregate_test_100.c2")])
388 .build()
389 .unwrap();
390 let t2 = t.select(vec![col("c1"), first_row])?;
391 let plan = t2.logical_plan().clone();
392
393 let sql_plan = create_plan(
394 "select c1, first_value(c1) over (partition by c2) from aggregate_test_100",
395 )
396 .await?;
397
398 assert_same_plan(&plan, &sql_plan);
399 Ok(())
400}
401
402#[tokio::test]
403async fn select_with_periods() -> Result<()> {

Callers

nothing calls this directly

Calls 10

test_tableFunction · 0.85
assert_same_planFunction · 0.85
create_planFunction · 0.70
first_valueFunction · 0.50
colFunction · 0.50
buildMethod · 0.45
partition_byMethod · 0.45
selectMethod · 0.45
cloneMethod · 0.45
logical_planMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…