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

Function test_display_subquery_alias

datafusion/expr/src/logical_plan/plan.rs:4532–4549  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4530
4531 #[test]
4532 fn test_display_subquery_alias() -> Result<()> {
4533 let plan1 = table_scan(Some("employee_csv"), &employee_schema(), Some(vec![3]))?
4534 .build()?;
4535 let plan1 = Arc::new(plan1);
4536
4537 let plan =
4538 table_scan(Some("employee_csv"), &employee_schema(), Some(vec![0, 3]))?
4539 .project(vec![col("id"), exists(plan1).alias("exists")])?
4540 .build();
4541
4542 assert_snapshot!(plan?.display_indent(), @r"
4543 Projection: employee_csv.id, EXISTS (<subquery>) AS exists
4544 Subquery:
4545 TableScan: employee_csv projection=[state]
4546 TableScan: employee_csv projection=[id, state]
4547 ");
4548 Ok(())
4549 }
4550
4551 #[test]
4552 fn test_display_graphviz() -> Result<()> {

Callers

nothing calls this directly

Calls 5

table_scanFunction · 0.85
newFunction · 0.85
employee_schemaFunction · 0.70
buildMethod · 0.45
projectMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…