-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[CALCITE-4765] Complex correlated EXISTS sub-queries used as scalar subqueries can return wrong results #4724
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
base: main
Are you sure you want to change the base?
Conversation
|
@NobiGo If you have time, could you please check if it's working correctly now? Since I couldn't find an |
mihaibudiu
left a comment
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.
The CI is unhappy for some reason too
053b4a9 to
01e4845
Compare
Fixed, thanks! |
|
This is the result compared with PGSQL. |
01e4845 to
9810a36
Compare
|
I tried constructing |
Is this the right link? |
Sorry, I have updated the original SQL to the SQL in the current PR. |
|
@NobiGo @mihaibudiu I have file a new jira CALCITE-7356 to describe it. |
9810a36 to
09d3b92
Compare
|
Since #4752 has been merged, this issue no longer exists, and I have updated the test. |
09d3b92 to
d8dae4a
Compare
silundong
left a comment
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. It seems the CI error is not related to the changes.
NobiGo
left a comment
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.
I hope we can add a test case in SqlToRelTest. It's not necessary to have completely identical metadata; using existing table names is fine, and this test case can clearly show how $cor0 is defined.
If you find the name confusing, can I change emps to emps_tmp? |
I suggest adding test cases to SqlToRelTest. You can directly use the metadata from SqlToRelTest instead of simulating the same table and column names.The current test cases in .iq are fine for me. |
…ubqueries can return wrong results
d8dae4a to
209152e
Compare
I have added test cases and change the table name in blank.iq; please check if they meet your requirements. |
|



See CALCITE-4765
Only add tests.