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(planner): support set operators in parser and planner #5833

Merged
merged 22 commits into from
Jun 13, 2022

Conversation

xudong963
Copy link
Member

@xudong963 xudong963 commented Jun 8, 2022

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

This PR contains three parts

  1. Support set operators in new parser
  2. Support intersect distinct and except distinct in new planner

Changelog

  • New Feature

Related Issues

Fixes #5825

@vercel
Copy link

vercel bot commented Jun 8, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Jun 13, 2022 at 8:18AM (UTC)

@mergify
Copy link
Contributor

mergify bot commented Jun 8, 2022

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label Jun 8, 2022
@xudong963 xudong963 requested review from andylokandy and leiysky and removed request for andylokandy June 8, 2022 04:43
@xudong963
Copy link
Member Author

I'll fix parser related tests after reviewers think my change in parser is ok.

@leiysky
Copy link
Contributor

leiysky commented Jun 9, 2022

Rest LGTM, @andylokandy PTAL

@xudong963 xudong963 changed the title feat(planner): support semi, anti join and part of set operators feat(planner): support set operators in parser and planner Jun 9, 2022
@xudong963
Copy link
Member Author

xudong963 commented Jun 9, 2022

Make the pr as draft and extract join related code to #5869

After aligning with @leiysky and @andylokandy , we need to do more for parser to support Set operator:

Nom can't solve the left combination problem, so we need to introduce Pratt Parser to process Set operator .
In the future, we can also use Pratt Parser to process Join and make it more regular.

@xudong963 xudong963 marked this pull request as draft June 9, 2022 08:33
common/ast/src/parser/token.rs Outdated Show resolved Hide resolved
common/ast/src/parser/query.rs Outdated Show resolved Hide resolved
query/src/sql/planner/mod.rs Outdated Show resolved Hide resolved
common/ast/src/parser/query.rs Outdated Show resolved Hide resolved
common/ast/src/parser/query.rs Outdated Show resolved Hide resolved
common/ast/src/parser/query.rs Outdated Show resolved Hide resolved
common/ast/src/parser/query.rs Outdated Show resolved Hide resolved
common/ast/src/parser/query.rs Outdated Show resolved Hide resolved
common/ast/src/ast/query.rs Outdated Show resolved Hide resolved
common/ast/src/ast/query.rs Show resolved Hide resolved
@xudong963 xudong963 marked this pull request as ready for review June 10, 2022 19:50
@xudong963 xudong963 requested a review from andylokandy June 11, 2022 08:18
Copy link
Collaborator

@andylokandy andylokandy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest LGTM

common/ast/src/parser/util.rs Outdated Show resolved Hide resolved
@mergify mergify bot merged commit d48033b into databendlabs:main Jun 13, 2022
@xudong963 xudong963 deleted the semi branch June 13, 2022 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-review pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: support SetOperator in new planner
5 participants