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

Function plan_builder_sort

datafusion/expr/src/logical_plan/builder.rs:2353–2368  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2351
2352 #[test]
2353 fn plan_builder_sort() -> Result<()> {
2354 let plan =
2355 table_scan(Some("employee_csv"), &employee_schema(), Some(vec![3, 4]))?
2356 .sort(vec![
2357 expr::Sort::new(col("state"), true, true),
2358 expr::Sort::new(col("salary"), false, false),
2359 ])?
2360 .build()?;
2361
2362 assert_snapshot!(plan, @r"
2363 Sort: employee_csv.state ASC NULLS FIRST, employee_csv.salary DESC NULLS LAST
2364 TableScan: employee_csv projection=[state, salary]
2365 ");
2366
2367 Ok(())
2368 }
2369
2370 #[test]
2371 fn plan_builder_union() -> Result<()> {

Callers

nothing calls this directly

Calls 4

table_scanFunction · 0.85
employee_schemaFunction · 0.70
buildMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…