irenjj commented on code in PR #15082:
URL: https://github.com/apache/datafusion/pull/15082#discussion_r1985993230
##########
datafusion/sqllogictest/test_files/explain_tree.slt:
##########
@@ -519,6 +519,150 @@ physical_plan
17)│ format: arrow │
18)└───────────────────────────┘
+
+# Query with projection on csv
+query TT
+explain SELECT int_col, bigint_col, int_col+bigint_col AS sum_col FROM table1;
+----
+logical_plan
+01)Projection: table1.int_col, table1.bigint_col, CAST(table1.int_col AS
Int64) + table1.bigint_col AS sum_col
+02)--TableScan: table1 projection=[int_col, bigint_col]
+physical_plan
+01)┌───────────────────────────┐
+02)│ ProjectionExec │
+03)│ -------------------- │
+04)│ ProjectionExec: expr: │
+05)│ [int_col@0 as int_col, │
+06)│ bigint_col@1 as │
+07)│ bigint_col, CAST │
+08)│ (int_col@0 AS Int64) + │
+09)│ bigint_col@1 as sum_col] │
+10)└─────────────┬─────────────┘
Review Comment:
`ProjectionExec` is the name of physical plan, it's collected in plan tree,
in `fmt_as` it's duplicated now.
What we really need here is `expr`, and in render tree, each line is parsed
to extract key and value, I think `writeln!(f, "expr=[{}]", expr.join(", "))`
is ok.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]