Skip to content

[tree explain] Simplify display format of AggregateFunctionExpr #15252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #14914
irenjj opened this issue Mar 15, 2025 · 1 comment · Fixed by #15253
Closed
Tracked by #14914

[tree explain] Simplify display format of AggregateFunctionExpr #15252

irenjj opened this issue Mar 15, 2025 · 1 comment · Fixed by #15253
Assignees

Comments

@irenjj
Copy link
Contributor

irenjj commented Mar 15, 2025

Is your feature request related to a problem or challenge?

part of #14914

The output of AggregateExec also seems to contain redundant information.

┌─────────────┴─────────────┐
│       AggregateExec       │
│    --------------------   │
│   aggr: count(Int64(1))   │
│        mode: Final        │
└─────────────┬─────────────┘

Describe the solution you'd like

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.

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant