-
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
fix regression in the use of name in ProjectionPushdown #8219
Conversation
5ee5697
to
8bd70d6
Compare
FYI @gruuya |
@@ -228,7 +228,7 @@ impl OptimizerRule for PushDownProjection { | |||
// Gather all columns needed for expressions in this Aggregate | |||
let mut new_aggr_expr = vec![]; | |||
for e in agg.aggr_expr.iter() { | |||
let column = Column::from(e.display_name()?); | |||
let column = Column::from_name(e.display_name()?); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was done in #7981 -- it doesn't seem necessary and I think was just a mistake (and did not have adequate test coverage)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for resolving this; this was a leftover from my initial attempt to address the qualified alias problem (without altering the Expr::Alias
enum) that I forgot to rollback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem. The real problem is that we had no test coverage for it :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm,
from
from_name
from_qualified_name
might be confusing, we may want to have better naming?
It is very confusing and results in subtle bugs. I'll see if I can find some way to make it better as a follow on PR |
Thank you for the quick review @comphead |
Which issue does this PR close?
Resolves #8223
Rationale for this change
We found a bug while upgrading IOx to use the latest datafusion
Some of our queries began failing like this:
The regression was introduced in #7981 and is related to columns with periods in their names
What changes are included in this PR?
DISTINCT ON
from Postgres #7981Are these changes tested?
yes
Are there any user-facing changes?
bug fix