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

[Multistage] Pushdown explain queries from controller to broker #10505

Merged

Conversation

tibrewalpratik17
Copy link
Contributor

@tibrewalpratik17 tibrewalpratik17 commented Mar 29, 2023

This is a small follow-up to #10336. We weren't pushing down explain queries before. This PR allows to push explain plan queries in case of Multistage from controller to broker.
Thanks @ankitsultana for pointing this out!

@tibrewalpratik17 tibrewalpratik17 changed the title [Multistage] Pushdown explain plan queries from controller to broker [Multistage] Pushdown explain queries from controller to broker Mar 29, 2023
@tibrewalpratik17 tibrewalpratik17 force-pushed the update_controller_pushdown branch from 28ba243 to 37d94b2 Compare March 29, 2023 19:46
@ankitsultana
Copy link
Contributor

Thanks Pratik. cc: @walterddr

@codecov-commenter
Copy link

codecov-commenter commented Mar 29, 2023

Codecov Report

Merging #10505 (37d94b2) into master (0c6c54e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master   #10505      +/-   ##
============================================
- Coverage     70.21%   70.20%   -0.01%     
+ Complexity     6116     6115       -1     
============================================
  Files          2090     2090              
  Lines        112207   112210       +3     
  Branches      17078    17079       +1     
============================================
- Hits          78784    78776       -8     
- Misses        27857    27881      +24     
+ Partials       5566     5553      -13     
Flag Coverage Δ
integration1 24.40% <0.00%> (-0.01%) ⬇️
integration2 24.24% <0.00%> (-0.23%) ⬇️
unittests1 67.87% <100.00%> (-0.03%) ⬇️
unittests2 13.97% <0.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...org/apache/pinot/sql/parsers/CalciteSqlParser.java 84.64% <100.00%> (+0.09%) ⬆️

... and 29 files with indirect coverage changes

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

Comment on lines +177 to +179
} else if (sqlNode instanceof SqlExplain) {
SqlExplain explain = (SqlExplain) sqlNode;
tableNames.addAll(extractTableNamesFromNode(explain.getExplicandum()));
Copy link
Contributor

Choose a reason for hiding this comment

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

This was never added previously. how come this become a problem after the broker tenant changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a miss in the previous PR. In case of multistage queries via controller, we extract the table name from the query to see all the tables are in the same tenant or not. In case of explain plan for ... queries, we missed out on extracting name in the parser. Added it here in this patch.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah... i understand now! good catch!

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.

4 participants