[opt](nereids) use binary search to prune partitions#44586
Merged
924060929 merged 11 commits intoapache:masterfrom Dec 24, 2024
Merged
[opt](nereids) use binary search to prune partitions#44586924060929 merged 11 commits intoapache:masterfrom
924060929 merged 11 commits intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
98f7178 to
5db0287
Compare
Contributor
Author
|
run buildall |
morrySnow
reviewed
Nov 28, 2024
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/MultiColumnBound.java
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/MultiColumnBound.java
Outdated
Show resolved
Hide resolved
...core/src/main/java/org/apache/doris/nereids/rules/expression/rules/PartitionItemToRange.java
Outdated
Show resolved
Hide resolved
...ore/src/main/java/org/apache/doris/nereids/rules/expression/rules/SortedPartitionRanges.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/PartitionPruner.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/doris/nereids/rules/expression/rules/PartitionPredicateToRange.java
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PruneOlapScanPartition.java
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/PartitionPruner.java
Show resolved
Hide resolved
5db0287 to
3674062
Compare
Contributor
Author
|
run buildall |
3674062 to
5bd7802
Compare
Contributor
Author
|
run buildall |
Contributor
|
Contributor
Author
|
run buildall |
Contributor
|
Contributor
Author
|
run buildall |
Contributor
|
Contributor
Author
|
run buildall |
Contributor
|
bafd5fb to
3b878fc
Compare
Contributor
Author
|
run buildall |
3b878fc to
264f436
Compare
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 39878 ms |
TPC-DS: Total hot run time: 196789 ms |
ClickBench: Total hot run time: 33.33 s |
264f436 to
197aa64
Compare
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 40019 ms |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 40120 ms |
TPC-DS: Total hot run time: 190521 ms |
ClickBench: Total hot run time: 32.06 s |
morrySnow
approved these changes
Dec 23, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
feiniaofeiafei
approved these changes
Dec 23, 2024
morningman
approved these changes
Dec 23, 2024
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 39820 ms |
TPC-DS: Total hot run time: 190328 ms |
ClickBench: Total hot run time: 32.55 s |
16 tasks
github-actions bot
pushed a commit
that referenced
this pull request
Jun 19, 2025
use binary search to speed up prune partitions. test: datetime partition column which range from 2020-07-02 to 2024-11-13, one date for one partition, query one partition for example `dt = '2024-01-02'`, this pr can speed up from QPS 160 to QPS 610
morrySnow
pushed a commit
that referenced
this pull request
Jun 20, 2025
morningman
pushed a commit
that referenced
this pull request
Dec 10, 2025
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 bot
pushed a commit
that referenced
this pull request
Dec 10, 2025
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**
zy-kkk
added a commit
to zy-kkk/doris
that referenced
this pull request
Dec 11, 2025
Followup apache#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**
starocean999
pushed a commit
that referenced
this pull request
Dec 11, 2025
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**
nagisa-kunhah
pushed a commit
to nagisa-kunhah/doris
that referenced
this pull request
Dec 14, 2025
Followup apache#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**
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
use binary search to speed up prune partitions.
test: datetime partition column which range from 2020-07-02 to 2024-11-13, one date for one partition, query one partition for example
dt = '2024-01-02', this pr can speed up from QPS 160 to QPS 610TODO:
date_add(dt, 1) = '2024-01-02;Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)