Skip to content

[tree explain] Simplify display format of AggregateFunctionExpr #15252

Closed
@irenjj

Description

@irenjj

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions