irenjj commented on code in PR #15163: URL: https://github.com/apache/datafusion/pull/15163#discussion_r1996678781
########## datafusion/sqllogictest/test_files/explain_tree.slt: ########## @@ -704,29 +704,26 @@ physical_plan 01)┌───────────────────────────┐ 02)│ ProjectionExec │ 03)│ -------------------- │ -04)│ count(*) ROWS BETWEEN │ -05)│ UNBOUNDED PRECEDING │ -06)│ AND UNBOUNDED FOLLOWING: │ -07)│ count(Int64(1)) ROWS │ -08)│ BETWEEN UNBOUNDED │ -09)│ PRECEDING AND UNBOUNDED │ -10)│ FOLLOWING@0 │ -11)└─────────────┬─────────────┘ -12)┌─────────────┴─────────────┐ -13)│ WindowAggExec │ -14)│ -------------------- │ -15)│ select_list: │ -16)│ count(Int64(1)) ROWS │ -17)│ BETWEEN UNBOUNDED │ -18)│ PRECEDING AND UNBOUNDED │ -19)│ FOLLOWING │ -20)└─────────────┬─────────────┘ -21)┌─────────────┴─────────────┐ -22)│ DataSourceExec │ -23)│ -------------------- │ -24)│ files: 1 │ -25)│ format: csv │ -26)└───────────────────────────┘ +04)│ count(Int64(1)) ROWS │ Review Comment: The output of `AggregateExec` also seems to contain redundant information. I debugged the code and found that the name of `AggregateFunctionExpr` is constructed in `create_aggregate_expr_and_maybe_filter`. In this function, debug information is generated for all Expr instances through Expr's SchemaDisplay. To address this issue, I propose the following solution: 1. Add a new member `sql_name` to `AggregateFunctionExpr`. 2. Introduce a new method `fmt_sql_name()` for `Expr`, similar to `schema_name()`, and override it in `AggregateFunction` to generate `sql_name`. 3. Modify `fmt_as` in `AggregateExec` to output `aggr_expr.sql_name` instead of `aggr_expr.name`. I'm not sure if this idea is correct. If you have any suggestions, that would be even better.❤️ -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org