Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #58877

Followup #44586
Enable binary search partition pruning optimization for Hive external
tables.

This PR adds binary search partition pruning support for Hive tables by:
- Adding `getSortedPartitionRanges()` method to `ExternalTable` base
class
- Maintaining sorted partition ranges directly in `HivePartitionValues`
for cache lifecycle consistency
- Overriding `getSortedPartitionRanges()` in `HMSExternalTable` to
provide sorted ranges

  **Performance improvement (20000 partitions, 1000 queries):**
  - Binary search enabled: **4.548 seconds**
  - Binary search disabled: **12.849 seconds**
  - **~2.8x faster**
@github-actions github-actions bot requested a review from yiguolei as a code owner December 10, 2025 16:14
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Dec 10, 2025
@hello-stephen
Copy link
Contributor

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 60.00% (33/55) 🎉
Increment coverage report
Complete coverage report

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Dec 12, 2025
@github-actions
Copy link
Contributor Author

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor Author

PR approved by anyone and no changes requested.

@yiguolei yiguolei merged commit 99ea4a8 into branch-4.0 Dec 12, 2025
24 of 27 checks passed
@github-actions github-actions bot deleted the auto-pick-58877-branch-4.0 branch December 12, 2025 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants