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

feat: implement exists subquery #1649

Closed
wants to merge 5 commits into from

Conversation

xudong963
Copy link
Member

@xudong963 xudong963 commented Jan 23, 2022

Which issue does this PR close?

Closes #1209

But in this ticket, I only implement the exists subquery. I believe this ticket is building a subquery skeleton which will make adding other subqueries convenient.

What changes are included in this PR?

After generating LogicalPlan, if the logical plan contains subqueries, it'll be rewrite to unnesting in logical level. The core advantage is that subqueries won't influence physical level.

Are there any user-facing changes?

Yes, API changes have already taken place in draft implementation.
But users can use subquery!

@xudong963 xudong963 marked this pull request as draft January 23, 2022 12:42
@github-actions github-actions bot added datafusion Changes in the datafusion crate sql SQL Planner labels Jan 23, 2022
@xudong963 xudong963 force-pushed the select_subquery branch 4 times, most recently from 55d9fea to 4b2151e Compare January 25, 2022 15:14
@xudong963 xudong963 force-pushed the select_subquery branch 5 times, most recently from 956d7f1 to 7d6abae Compare February 4, 2022 07:49
@xudong963
Copy link
Member Author

This ticket is actively developing during my chunks of free time, such as weekends and holidays. When I think it's ok, I'll make it ready for review.

@yahoNanJing
Copy link
Contributor

Hi @xudong963, how's the progress?

In our case, we need to use in subquery. Do you have plan for that? If no, I'll try to implement that.

@xudong963 xudong963 mentioned this pull request Feb 15, 2022
6 tasks
@xudong963
Copy link
Member Author

Hi @xudong963, how's the progress?

In our case, we need to use in subquery. Do you have plan for that? If no, I'll try to implement that.

The PR now has finished skeleton, I'll fix the bug and add more tests in the PR on weekend. After the PR is finished, the IN subquery can be easy to add by using the subquery skeleton.

@mingmwang
Copy link
Contributor

Hi, @xudong963

If you do not mind, I can continue working on this PR.

@xudong963
Copy link
Member Author

Hi, @xudong963

If you do not mind, I can continue working on this PR.

Thanks @mingmwang, I don't mind at all. I recently changed my job and didn't have much time to move forward.

@xudong963 xudong963 closed this Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate sql SQL Planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support more subqueries
3 participants