-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make alias_symbol
more human-readable
#10280
Comments
Hey, this optimizer rule is used by so many test cases, so I wanted to collect opinions before proceeding with implementing the change. My suggestionUsing AggregateExec: mode=Partial, gby=[${CAST(number.c0 AS Int64) + Int64(1)}@0 as number.c0 + Int64(1)], aggr=[COUNT(number.c0 + Int64(1))]
ProjectionExec: expr=[CAST(c0@0 AS Int64) + 1 as ${CAST(number.c0 AS Int64) + Int64(1)}] Or to make plans shorter, $0, $1, etc... Some naming alternatives I've considered
AggregateExec: mode=Partial, gby=[CAST(number.c0_AS_Int64)_+_Int64(1)@0 as number.c0 + Int64(1)], aggr=[COUNT(number.c0 + Int64(1))]
ProjectionExec: expr=[CAST(c0@0 AS Int64) + 1 as CAST(number.c0_AS_Int64)_+_Int64(1) It's not immediately obvious + what happens if the column doesn't have a space? Please feel free to share other alternatives. |
#10333 is a really nice PR 💯 |
We unfortunately found issues in #10333 so we are going to revert it in #10436 See discussion here: #10436 (review) |
Is your feature request related to a problem or challenge?
ProjectionExec: expr=[CAST(c0@0 AS Int64) + 1 as CAST(number.c0 AS Int64) + Int64(1)Int64(1)CAST(number.c0 AS Int64)number.c0] |
The
expr
ofProjectionExec
is confusing.The related code:
datafusion/datafusion/optimizer/src/common_subexpr_eliminate.rs
Lines 676 to 687 in b41ef20
Maybe we should make it more human-readable.
Describe the solution you'd like
or
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: