Skip to content

Conversation

@tibrewalpratik17
Copy link
Contributor

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.

@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2023

Codecov Report

Merging #10336 (77d0487) into master (7c3c8e8) will increase coverage by 1.95%.
The diff coverage is 43.28%.

@@             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     
Flag Coverage Δ
integration1 24.49% <2.98%> (+0.15%) ⬆️
integration2 24.31% <2.98%> (?)
unittests1 67.92% <87.87%> (+0.04%) ⬆️
unittests2 13.88% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...t/controller/api/resources/PinotQueryResource.java 43.75% <0.00%> (+32.56%) ⬆️
...org/apache/pinot/sql/parsers/CalciteSqlParser.java 84.44% <86.66%> (+0.15%) ⬆️
.../apache/pinot/common/exception/QueryException.java 94.50% <100.00%> (+0.06%) ⬆️
...pache/pinot/common/utils/request/RequestUtils.java 80.90% <100.00%> (+2.20%) ⬆️

... and 194 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@ankitsultana ankitsultana left a comment

Choose a reason for hiding this comment

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

fyi: @walterddr

Copy link
Contributor

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?

Copy link
Contributor Author

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.

@tibrewalpratik17 tibrewalpratik17 force-pushed the allow_controller_multistage branch 3 times, most recently from 9ecfc05 to 1083a1e Compare February 28, 2023 10:45
Copy link
Contributor

@ankitsultana ankitsultana left a comment

Choose a reason for hiding this comment

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

Lgtm. Thank you!

Copy link
Contributor

@walterddr walterddr left a 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

@tibrewalpratik17 tibrewalpratik17 force-pushed the allow_controller_multistage branch from 7eea3a0 to d705e89 Compare March 9, 2023 18:33
@tibrewalpratik17 tibrewalpratik17 force-pushed the allow_controller_multistage branch from d705e89 to 6ad8b7a Compare March 9, 2023 20:42
Copy link
Contributor

@walterddr walterddr left a 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

Copy link
Contributor

@walterddr walterddr left a comment

Choose a reason for hiding this comment

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

lgtm.

@tibrewalpratik17 tibrewalpratik17 force-pushed the allow_controller_multistage branch from 77d0487 to 142b2c4 Compare March 12, 2023 13:59
@walterddr walterddr merged commit 41db045 into apache:master Mar 13, 2023
@tibrewalpratik17 tibrewalpratik17 deleted the allow_controller_multistage branch March 13, 2023 17:10
@kishoreg
Copy link
Member

looks like this broke explain

@ankitsultana
Copy link
Contributor

Yeah this had. @tibrewalpratik17 had merged this which should have fixed it: #10505

Are explain queries still failing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants