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(sql): look for CTEs under value expressions as well #8633

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

kszucs
Copy link
Member

@kszucs kszucs commented Mar 12, 2024

Common table expressions haven't been extracted for subqueries because we stopped traversing once reaching any value expression.

@kszucs kszucs force-pushed the value-ctes branch 4 times, most recently from d96d71d to df5961c Compare March 12, 2024 22:09
@cpcloud
Copy link
Member

cpcloud commented Mar 12, 2024

Would this also address #8484?

@kszucs
Copy link
Member Author

kszucs commented Mar 12, 2024

Would this also address #8484?

I doubt because there are no subqueries, it could if we artificially introduce subqueries to not repeat tedious value expressions.

@cpcloud cpcloud added this to the 9.0 milestone Mar 13, 2024
@cpcloud cpcloud added the bug Incorrect behavior inside of ibis label Mar 13, 2024
@cpcloud
Copy link
Member

cpcloud commented Mar 13, 2024

@kszucs Is this ready for review?

@kszucs kszucs marked this pull request as ready for review March 13, 2024 15:42
@kszucs
Copy link
Member Author

kszucs commented Mar 13, 2024

@kszucs Is this ready for review?

Yes. I will add test cases for the relevant map issues in a follow-up.

@kszucs
Copy link
Member Author

kszucs commented Mar 13, 2024

@kszucs Is this ready for review?

Yes. I will add test cases for the relevant map issues in a follow-up.

Turns out it won't resolve those since those subqueries don't occur more than once.

@cpcloud cpcloud enabled auto-merge (squash) March 14, 2024 10:14
@cpcloud cpcloud merged commit 14358fe into ibis-project:main Mar 14, 2024
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior inside of ibis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: subqueries get inlined multiple times, each copy evaluating to different value
2 participants