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

Support Subquery on WHERE with IN/Not IN #147

Merged
merged 8 commits into from
Feb 28, 2024
Merged

Support Subquery on WHERE with IN/Not IN #147

merged 8 commits into from
Feb 28, 2024

Conversation

KKould
Copy link
Member

@KKould KKould commented Feb 28, 2024

What problem does this PR solve?

feat:

  • support Subquery on WHERE with IN/Not IN
  • support LeftSemi & LeftAnti

refactor:

  • Take out the Schema in the Tuple, Get Schema through Plan before execution

invalid:

  • Index's tuple_ids -> tuple_id

style:

  • remove Transaction::drop_column's if_not_exists and delete the column first and then delete the related index
select * from test where c1 in (select 1)

+---------+---------+---------+
| test.id | test.c1 | test.c2 |
+=============================+
| 0       | 1       | 1       |
|---------+---------+---------|
| 2       | 1       | 1       |
+---------+---------+---------+

explain select * from test where c1 in (select 1)

+-------------------------------------------------------------------+
| PLAN                                                              |
+===================================================================+
| Projection [test.id, test.c1, test.c2] [Project]                  |
|   LeftSemi Join On test.c1 = (1) as (_temp_table_1_.1) [HashJoin] |
|     Scan test -> [id, c1, c2] [SeqScan]                           |
|     Projection [1] [Project]                                      |
|       Dummy [Dummy]                                               |
+-------------------------------------------------------------------+

Issue link:

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 self-assigned this Feb 28, 2024
@KKould KKould added enhancement New feature or request invalid This doesn't seem right labels Feb 28, 2024
@KKould KKould mentioned this pull request Feb 28, 2024
51 tasks
@KKould KKould merged commit 5778712 into KipData:main Feb 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant