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

Function plan_builder_union

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

Source from the content-addressed store, hash-verified

2369
2370 #[test]
2371 fn plan_builder_union() -> Result<()> {
2372 let plan =
2373 table_scan(Some("employee_csv"), &employee_schema(), Some(vec![3, 4]))?;
2374
2375 let plan = plan
2376 .clone()
2377 .union(plan.clone().build()?)?
2378 .union(plan.clone().build()?)?
2379 .union(plan.build()?)?
2380 .build()?;
2381
2382 assert_snapshot!(plan, @r"
2383 Union
2384 Union
2385 Union
2386 TableScan: employee_csv projection=[state, salary]
2387 TableScan: employee_csv projection=[state, salary]
2388 TableScan: employee_csv projection=[state, salary]
2389 TableScan: employee_csv projection=[state, salary]
2390 ");
2391
2392 Ok(())
2393 }
2394
2395 #[test]
2396 fn plan_builder_union_distinct() -> Result<()> {

Callers

nothing calls this directly

Calls 5

table_scanFunction · 0.85
employee_schemaFunction · 0.70
buildMethod · 0.45
unionMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…