Skip to content
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 "Projection references non-aggregate values" by updating rebase_expr to use transform_down #8890

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

wizardxz
Copy link
Contributor

@wizardxz wizardxz commented Jan 17, 2024

Which issue does this PR close?

Closes #8280
Closes #8898

Rationale for this change

rebase_expr should strive to re-base on the outermost available base expression in order to minimize (however negligible) the computation that needs to be done on top of it.

What changes are included in this PR?

rebase_expr()

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions github-actions bot added sql SQL Planner sqllogictest SQL Logic Tests (.slt) labels Jan 17, 2024
@alamb alamb changed the title Zhong/fix rebase expr Improve performance for rebase_expr by using transform_up Jan 17, 2024
@alamb alamb changed the title Improve performance for rebase_expr by using transform_up Improve performance for rebase_expr by using transform_down Jan 17, 2024
@wizardxz
Copy link
Contributor Author

@alamb This is not just performance, but also correctness, see my comment in #8280 (comment)

@alamb
Copy link
Contributor

alamb commented Jan 17, 2024

@alamb This is not just performance, but also correctness, see my comment in #8280 (comment)

Thanks @wizardxz -- I have updated the PR title and also made #8898 so it was clearer that this is correctness as well

@alamb alamb changed the title Improve performance for rebase_expr by using transform_down Fix "Projection references non-aggregate values" by updating rebase_expr to use transform_down Jan 17, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me -- thank you @wizardxz

cc @gruuya

@alamb alamb merged commit d14f766 into apache:main Jan 18, 2024
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sql SQL Planner sqllogictest SQL Logic Tests (.slt)
Projects
None yet
2 participants