-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Multistage] Allow queries on multiple tables of same tenant to be executed from controller UI #10336
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
[Multistage] Allow queries on multiple tables of same tenant to be executed from controller UI #10336
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10336 +/- ##
============================================
+ Coverage 68.27% 70.23% +1.95%
- Complexity 5262 6026 +764
============================================
Files 2049 2049
Lines 111033 111134 +101
Branches 16891 16917 +26
============================================
+ Hits 75810 78050 +2240
+ Misses 29816 27617 -2199
- Partials 5407 5467 +60
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 194 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
ankitsultana
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.
fyi: @walterddr
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.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.
When can the else clause be hit?
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.
There are a lot of extensions of SqlNode. I have tried to cover the ones which are hit through most common query patterns. In cases of SqlDelete, SqlCreate we would hit else clause. In those cases, we would return an empty list for now.
...t-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java
Outdated
Show resolved
Hide resolved
...t-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java
Outdated
Show resolved
Hide resolved
...t-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java
Outdated
Show resolved
Hide resolved
pinot-common/src/test/java/org/apache/pinot/sql/parsers/CalciteSqlCompilerTest.java
Outdated
Show resolved
Hide resolved
...t-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java
Outdated
Show resolved
Hide resolved
9ecfc05 to
1083a1e
Compare
ankitsultana
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. Thank you!
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.
looks good to me mostly. can we add a integration test just to make sure this is covered? you can extend the MultistageIntegrationTest and add additional tenant for verification
7eea3a0 to
d705e89
Compare
d705e89 to
6ad8b7a
Compare
pinot-common/src/main/java/org/apache/pinot/common/exception/QueryException.java
Outdated
Show resolved
Hide resolved
pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java
Outdated
Show resolved
Hide resolved
...t-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java
Outdated
Show resolved
Hide resolved
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.
looks good to me overall. have some follow up comments .please kindly take a look
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.
...t-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java
Outdated
Show resolved
Hide resolved
77d0487 to
142b2c4
Compare
|
looks like this broke explain |
|
Yeah this had. @tibrewalpratik17 had merged this which should have fixed it: #10505 Are explain queries still failing? |
At present, via Controller UI we can only execute multistage queries on DefaultTenant. This patch checks if the tables queried are having atleast one common tenant and allows queries to be executed.