-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 PostgreSQL set operation precedence #3567
Conversation
Signed-off-by: tison <wander4096@gmail.com>
145f346
to
2f402f7
Compare
…select_with_parens Signed-off-by: tison <wander4096@gmail.com>
test locally with |
@teverett is Windows build unstable? I check the CI log and it seems all about package installing instead of tests failure. |
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.
Please add a test that covers suggested changes.
@KvanTTT The current maven tests seems only test if the query parsed, not the result it parsed out. Shall I build the whole test kit from scratch to verify the op precedence result, or there are some existing tools/cases to leverage? |
Co-authored-by: Ivan Kochurkin <kvanttt@gmail.com>
Now the origin select_cause is redundant since simple_select matches select_with_parens
: simple_select_pramary (INTERSECT all_or_distinct simple_select_pramary)* | ||
; | ||
|
||
simple_select_pramary |
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.
simple_select_"pramary" ? Do you mean "primary" ?
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 should be a typo 🤣
Comes from #2378 (comment).
PG treats set ops in different precedence - INTERSECT is tighter than UNION and EXCEPT.