-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[multi-stage] Query compilation support for SetOperations: UNION/INTERSECT/MINUS(EXCEPT) in multi-stage engine #10535
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
Conversation
b78280d to
c2487f0
Compare
Codecov Report
@@ Coverage Diff @@
## master #10535 +/- ##
============================================
- Coverage 70.35% 68.52% -1.84%
+ Complexity 6499 6486 -13
============================================
Files 2107 2108 +1
Lines 113460 113535 +75
Branches 17101 17117 +16
============================================
- Hits 79822 77795 -2027
- Misses 28038 30185 +2147
+ Partials 5600 5555 -45
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 167 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
c2487f0 to
f13a273
Compare
4f9e11b to
5e95130
Compare
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
Outdated
Show resolved
Hide resolved
pinot-common/src/test/java/org/apache/pinot/sql/parsers/CalciteSqlCompilerTest.java
Outdated
Show resolved
Hide resolved
...query-planner/src/main/java/org/apache/pinot/query/planner/logical/StageMetadataVisitor.java
Outdated
Show resolved
Hide resolved
37fe4a4 to
00f2011
Compare
...uery-planner/src/main/java/org/apache/pinot/query/planner/logical/ShuffleRewriteVisitor.java
Outdated
Show resolved
Hide resolved
...y-planner/src/main/java/org/apache/pinot/query/planner/physical/DispatchablePlanVisitor.java
Outdated
Show resolved
Hide resolved
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.
@ankitsultana can you take a look and see if this works with your expectation? even if we do not allow visitSetOp is a valid current limitation IMO
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 added a new field for SetOp. Partitioning is a must to ensure the correctness.
walterddr
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 otherwise
|
@xiangfu0 : Can you add tests which demonstrate what the plan is going to look like for queries with set-ops? |
8d49e66 to
0d612d1
Compare
Added a SetOpPlans.json file |
1a2580f to
8d844d5
Compare
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.
@xiangfu0 : Shouldn't intersect require an exchange?
If the row col1=10, col2=11 in tables a and b are on different servers, if we don't shuffle using the intersection key (or broadcast one side) we may end up dropping them from the result-set.
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.
...main/java/org/apache/pinot/query/planner/physical/colocated/GreedyShuffleRewriteVisitor.java
Outdated
Show resolved
Hide resolved
…n in query planner
8d844d5 to
2f56bf2
Compare
Query compilation support for SetOperations: UNION/INTERSECT/MINUS(EXCEPT) in multi-stage engine.
Will have a few follow up PRs for the implementations of:
UNION ALL, UNION, INTERSECT, MINUS(EXCEPT)