Skip to content

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

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.

@walterddr walterddr requested a review from xiangfu0 January 8, 2024 17:19
@walterddr walterddr force-pushed the bugfix_skip_local_sort branch from 241918e to 9f8b95b Compare January 8, 2024 19:37
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.52%. Comparing base (d1cc17c) to head (9f8b95b).
⚠️ Report is 2958 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.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gortiz
Copy link
Contributor

gortiz commented Dec 5, 2025

or fetch limit is too large.

Recently, we found cases where users were using very large limit, and this change backfired us. What is the advantage of removing the sort when the limit is larger than 10k?

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