-
Notifications
You must be signed in to change notification settings - Fork 590
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): support set operations wrapping subqueries #8414
Conversation
|
This is failing for two reasons:
|
|
|
8d0e972
to
3736686
Compare
3736686
to
f6a7e0d
Compare
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.
SQL is so annoying sometimes.
This PR gets benchmarks passing again. Nesting levels were increased by #8414. Unfortunately, SQLGlot's SQL generation algorithm (but not its parsing algorithm) is recursive. This means that it cannot handle large nesting levels of select statements. Pre-SQLGlot, Ibis used to handle much larger nesting levels. This functionality was lost in the sqlglot refactor. Ultimately, someone needs to address this upstream in sqlglot by converting the generation algorithm to an iterative one. I believe we should gain a little bit back after #8572 is merged, since fewer select statements will be generated.
Previously this would generate invalid SQL if the subqueries repeated components of a SELECT (e.g. included an
ORDER BYclause).Fixes #8561.