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][bugfix] improve sort copy rule #12237

Merged
merged 2 commits into from Jan 9, 2024

Conversation

walterddr
Copy link
Contributor

@walterddr walterddr commented Jan 8, 2024

logical sort should not be copied when there's no fetch or fetch limit is too large.

this solves part 1 of #12228

follow up separately later

  1. when we support k-merge sort we should allow sort-copy again for distributed local sort.
  2. make fetch limit configurable.

logical sort should not be copied when there's no fetch or fetch limit is too large
@walterddr walterddr marked this pull request as ready for review January 8, 2024 17:19
@@ -42,6 +42,7 @@ public class PinotSortExchangeCopyRule extends RelRule<RelRule.Config> {

public static final PinotSortExchangeCopyRule SORT_EXCHANGE_COPY =
PinotSortExchangeCopyRule.Config.DEFAULT.toRule();
private static final int DEFAULT_SORT_EXCHANGE_COPY_THRESHOLD = 10_000;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

10_000 is a reasonable heuristic until we get a config/hint.

Copy link
Contributor

Choose a reason for hiding this comment

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

is it worth to make this configurable as a query param?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

probably. but i haven't decided whether to use a hint or use a query param. so for now i will keep this as a default and if we need to support configuration we will do that then.

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d1cc17c) 61.53% compared to head (9f8b95b) 61.52%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12237      +/-   ##
============================================
- Coverage     61.53%   61.52%   -0.02%     
  Complexity      207      207              
============================================
  Files          2416     2416              
  Lines        131177   131181       +4     
  Branches      20245    20246       +1     
============================================
- Hits          80717    80704      -13     
- Misses        44570    44585      +15     
- Partials       5890     5892       +2     
Flag Coverage Δ
custom-integration1 <0.01% <ø> (ø)
integration <0.01% <ø> (ø)
integration1 <0.01% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 34.78% <ø> (-26.71%) ⬇️
java-21 61.38% <ø> (-0.01%) ⬇️
skip-bytebuffers-false 61.50% <ø> (-0.02%) ⬇️
skip-bytebuffers-true 61.35% <ø> (-0.02%) ⬇️
temurin 61.52% <ø> (-0.02%) ⬇️
unittests 61.51% <ø> (-0.02%) ⬇️
unittests1 46.61% <ø> (-0.01%) ⬇️
unittests2 27.69% <ø> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@walterddr walterddr merged commit d1817ef into apache:master Jan 9, 2024
18 of 19 checks passed
saurabhd336 pushed a commit to saurabhd336/pinot that referenced this pull request Feb 9, 2024
Co-authored-by: Rong Rong <rongr@startree.ai>
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.

None yet

3 participants