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: In multi-level nested subquery, the field relationships of different tables are wrong #173

Merged
merged 6 commits into from
Mar 21, 2024

Conversation

KKould
Copy link
Member

@KKould KKould commented Mar 20, 2024

What problem does this PR solve?

ref:

Issue link: #169

explain SELECT b FROM t1 WHERE a in (SELECT a FROM t2 where a in (select a from t1));

+-------------------------------------------------------------------------+
| PLAN                                                                    |
+=========================================================================+
| Projection [t1.b] [Project]                                             |
|   LeftSemi Join On t1.a = (t2.a) as (_temp_table_1_.a) [HashJoin]       |
|     Scan t1 -> [a, b] [SeqScan]                                         |
|     Projection [(t2.a) as (_temp_table_1_.a)] [Project]                 |
|       Projection [t2.a] [Project]                                       |
|         LeftSemi Join On t2.a = (t1.a) as (_temp_table_0_.a) [HashJoin] |
|           Scan t2 -> [a] [SeqScan]                                      |
|           Projection [(t1.a) as (_temp_table_0_.a)] [Project]           |
|             Projection [t1.a] [Project]                                 |
|               Scan t1 -> [a] [SeqScan]                                  |
+-------------------------------------------------------------------------+

What is changed and how it works?

Code changes

  • Has Rust code change
  • Has CI related scripts change

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Note for reviewer

@KKould KKould added the bug Something isn't working label Mar 20, 2024
@KKould KKould self-assigned this Mar 20, 2024
@KKould KKould marked this pull request as draft March 20, 2024 18:42
@KKould KKould marked this pull request as ready for review March 21, 2024 01:34
@KKould KKould requested a review from crwen March 21, 2024 01:37
@KKould KKould merged commit e0de637 into KipData:main Mar 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: In multi-level nested subquery, the field relationships of different tables are wrong.
2 participants