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

Function plan_builder_schema

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

Source from the content-addressed store, hash-verified

2321
2322 #[test]
2323 fn plan_builder_schema() {
2324 let schema = employee_schema();
2325 let projection = None;
2326 let plan =
2327 LogicalPlanBuilder::scan("employee_csv", table_source(&schema), projection)
2328 .unwrap();
2329 assert_snapshot!(plan.schema().as_ref(), @"fields:[employee_csv.id, employee_csv.first_name, employee_csv.last_name, employee_csv.state, employee_csv.salary], metadata:{}");
2330
2331 // Note scan of "EMPLOYEE_CSV" is treated as a SQL identifier
2332 // (and thus normalized to "employee"csv") as well
2333 let projection = None;
2334 let plan =
2335 LogicalPlanBuilder::scan("EMPLOYEE_CSV", table_source(&schema), projection)
2336 .unwrap();
2337 assert_snapshot!(plan.schema().as_ref(), @"fields:[employee_csv.id, employee_csv.first_name, employee_csv.last_name, employee_csv.state, employee_csv.salary], metadata:{}");
2338 }
2339
2340 #[test]
2341 fn plan_builder_empty_name() {

Callers

nothing calls this directly

Calls 3

table_sourceFunction · 0.85
employee_schemaFunction · 0.70
scanFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…