-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feat](nereids) simplify range support not equal / is null / is not null #57537
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
Merged
Conversation
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
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
4056cab to
09761ac
Compare
09761ac to
215aa53
Compare
Contributor
Author
|
run buildall |
Contributor
Author
|
run buildall |
TPC-DS: Total hot run time: 188824 ms |
ClickBench: Total hot run time: 27.76 s |
Contributor
FE UT Coverage ReportIncrement line coverage |
Contributor
FE Regression Coverage ReportIncrement line coverage |
Contributor
Author
|
run buildall |
TPC-DS: Total hot run time: 189098 ms |
ClickBench: Total hot run time: 27.32 s |
ad137ae to
e0a8724
Compare
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Nov 28, 2025
for RangeAll(a) intersect IsNull(a), cann't simplify it to FALSE because when a is null, the result is null. Only when a is not null, can simplify it to FALSE. introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Nov 28, 2025
…on (apache#58475) Fix immutable map removeIf throw UnsupportedOperationException introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Dec 1, 2025
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Dec 1, 2025
for RangeAll(a) intersect IsNull(a), cann't simplify it to FALSE because when a is null, the result is null. Only when a is not null, can simplify it to FALSE. introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Dec 1, 2025
…on (apache#58475) Fix immutable map removeIf throw UnsupportedOperationException introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Dec 2, 2025
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Dec 2, 2025
for RangeAll(a) intersect IsNull(a), cann't simplify it to FALSE because when a is null, the result is null. Only when a is not null, can simplify it to FALSE. introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Dec 2, 2025
…on (apache#58475) Fix immutable map removeIf throw UnsupportedOperationException introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Dec 8, 2025
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Dec 8, 2025
for RangeAll(a) intersect IsNull(a), cann't simplify it to FALSE because when a is null, the result is null. Only when a is not null, can simplify it to FALSE. introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Dec 8, 2025
…on (apache#58475) Fix immutable map removeIf throw UnsupportedOperationException introduce by apache#57537
nagisa-kunhah
pushed a commit
to nagisa-kunhah/doris
that referenced
this pull request
Dec 14, 2025
nagisa-kunhah
pushed a commit
to nagisa-kunhah/doris
that referenced
this pull request
Dec 14, 2025
for RangeAll(a) intersect IsNull(a), cann't simplify it to FALSE because when a is null, the result is null. Only when a is not null, can simplify it to FALSE. introduce by apache#57537
nagisa-kunhah
pushed a commit
to nagisa-kunhah/doris
that referenced
this pull request
Dec 14, 2025
…on (apache#58475) Fix immutable map removeIf throw UnsupportedOperationException introduce by apache#57537
16 tasks
morrySnow
pushed a commit
that referenced
this pull request
Jan 9, 2026
…es (#59671) simplify range have exception: mysql > explain select pk from table_0_500_undef_partitions2_keys3_properties4_distributed_by5 where not ( date_sub(col_date_undef_signed, interval 1 day) > '2010-03-21' or null ) or lower(col_varchar_20__undef_signed) between null and 'e'; (1105, "errCode = 2, detailMessage = Cannot compare two values with different data types: 2010-03-22 (DATEV2) vs 'e' (VARCHAR(1))") PR #57537 introduce merging compound value with other value desc. when merge value desc, it will merge values with the same reference. but for compound value, its reference have other meaning: 1) a < 1 or a > 10, this is a compound value, its reference is a; 2) a < 1 or b > 10, this is a compound value, its reference is 'a < 1 or b > 10'. then for expression `TA > 1 and FALSE or FALSE and SB > 'abc''`, for the operator OR, it will have two compound values: a. C1 = CompoundValue(referece = getCompoundExpression(TA > 1 and FALSE) = FALSE, source values={TA > 1, FALSE}) b. C2 = CompoundValue(reference = getCompoundExpression(FALSE and SB > 'abc') = FALSE, source values={FALSE, SB > 'abc'}) because the function getCompoundExpression will fold constant, then C1 andC2's referece will be 'FALSE', and since C1 and C2's reference equals, then will try merge C1 and C2, then will check merge ' > 1' and ' > abc' will cause the above exception. to fix this, for a compound value if its source values different reference (like a < 1 or b > 10), then don't merge it with other values descs.
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 9, 2026
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 9, 2026
for RangeAll(a) intersect IsNull(a), cann't simplify it to FALSE because when a is null, the result is null. Only when a is not null, can simplify it to FALSE. introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 9, 2026
…on (apache#58475) Fix immutable map removeIf throw UnsupportedOperationException introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 9, 2026
…es (apache#59671) simplify range have exception: mysql > explain select pk from table_0_500_undef_partitions2_keys3_properties4_distributed_by5 where not ( date_sub(col_date_undef_signed, interval 1 day) > '2010-03-21' or null ) or lower(col_varchar_20__undef_signed) between null and 'e'; (1105, "errCode = 2, detailMessage = Cannot compare two values with different data types: 2010-03-22 (DATEV2) vs 'e' (VARCHAR(1))") PR apache#57537 introduce merging compound value with other value desc. when merge value desc, it will merge values with the same reference. but for compound value, its reference have other meaning: 1) a < 1 or a > 10, this is a compound value, its reference is a; 2) a < 1 or b > 10, this is a compound value, its reference is 'a < 1 or b > 10'. then for expression `TA > 1 and FALSE or FALSE and SB > 'abc''`, for the operator OR, it will have two compound values: a. C1 = CompoundValue(referece = getCompoundExpression(TA > 1 and FALSE) = FALSE, source values={TA > 1, FALSE}) b. C2 = CompoundValue(reference = getCompoundExpression(FALSE and SB > 'abc') = FALSE, source values={FALSE, SB > 'abc'}) because the function getCompoundExpression will fold constant, then C1 andC2's referece will be 'FALSE', and since C1 and C2's reference equals, then will try merge C1 and C2, then will check merge ' > 1' and ' > abc' will cause the above exception. to fix this, for a compound value if its source values different reference (like a < 1 or b > 10), then don't merge it with other values descs.
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 9, 2026
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 9, 2026
for RangeAll(a) intersect IsNull(a), cann't simplify it to FALSE because when a is null, the result is null. Only when a is not null, can simplify it to FALSE. introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 9, 2026
…on (apache#58475) Fix immutable map removeIf throw UnsupportedOperationException introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 9, 2026
…es (apache#59671) simplify range have exception: mysql > explain select pk from table_0_500_undef_partitions2_keys3_properties4_distributed_by5 where not ( date_sub(col_date_undef_signed, interval 1 day) > '2010-03-21' or null ) or lower(col_varchar_20__undef_signed) between null and 'e'; (1105, "errCode = 2, detailMessage = Cannot compare two values with different data types: 2010-03-22 (DATEV2) vs 'e' (VARCHAR(1))") PR apache#57537 introduce merging compound value with other value desc. when merge value desc, it will merge values with the same reference. but for compound value, its reference have other meaning: 1) a < 1 or a > 10, this is a compound value, its reference is a; 2) a < 1 or b > 10, this is a compound value, its reference is 'a < 1 or b > 10'. then for expression `TA > 1 and FALSE or FALSE and SB > 'abc''`, for the operator OR, it will have two compound values: a. C1 = CompoundValue(referece = getCompoundExpression(TA > 1 and FALSE) = FALSE, source values={TA > 1, FALSE}) b. C2 = CompoundValue(reference = getCompoundExpression(FALSE and SB > 'abc') = FALSE, source values={FALSE, SB > 'abc'}) because the function getCompoundExpression will fold constant, then C1 andC2's referece will be 'FALSE', and since C1 and C2's reference equals, then will try merge C1 and C2, then will check merge ' > 1' and ' > abc' will cause the above exception. to fix this, for a compound value if its source values different reference (like a < 1 or b > 10), then don't merge it with other values descs.
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 12, 2026
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 12, 2026
for RangeAll(a) intersect IsNull(a), cann't simplify it to FALSE because when a is null, the result is null. Only when a is not null, can simplify it to FALSE. introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 12, 2026
…on (apache#58475) Fix immutable map removeIf throw UnsupportedOperationException introduce by apache#57537
yujun777
added a commit
to yujun777/doris
that referenced
this pull request
Jan 12, 2026
…es (apache#59671) simplify range have exception: mysql > explain select pk from table_0_500_undef_partitions2_keys3_properties4_distributed_by5 where not ( date_sub(col_date_undef_signed, interval 1 day) > '2010-03-21' or null ) or lower(col_varchar_20__undef_signed) between null and 'e'; (1105, "errCode = 2, detailMessage = Cannot compare two values with different data types: 2010-03-22 (DATEV2) vs 'e' (VARCHAR(1))") PR apache#57537 introduce merging compound value with other value desc. when merge value desc, it will merge values with the same reference. but for compound value, its reference have other meaning: 1) a < 1 or a > 10, this is a compound value, its reference is a; 2) a < 1 or b > 10, this is a compound value, its reference is 'a < 1 or b > 10'. then for expression `TA > 1 and FALSE or FALSE and SB > 'abc''`, for the operator OR, it will have two compound values: a. C1 = CompoundValue(referece = getCompoundExpression(TA > 1 and FALSE) = FALSE, source values={TA > 1, FALSE}) b. C2 = CompoundValue(reference = getCompoundExpression(FALSE and SB > 'abc') = FALSE, source values={FALSE, SB > 'abc'}) because the function getCompoundExpression will fold constant, then C1 andC2's referece will be 'FALSE', and since C1 and C2's reference equals, then will try merge C1 and C2, then will check merge ' > 1' and ' > abc' will cause the above exception. to fix this, for a compound value if its source values different reference (like a < 1 or b > 10), then don't merge it with other values descs.
zzzxl1993
pushed a commit
to zzzxl1993/doris
that referenced
this pull request
Jan 13, 2026
…es (apache#59671) simplify range have exception: mysql > explain select pk from table_0_500_undef_partitions2_keys3_properties4_distributed_by5 where not ( date_sub(col_date_undef_signed, interval 1 day) > '2010-03-21' or null ) or lower(col_varchar_20__undef_signed) between null and 'e'; (1105, "errCode = 2, detailMessage = Cannot compare two values with different data types: 2010-03-22 (DATEV2) vs 'e' (VARCHAR(1))") PR apache#57537 introduce merging compound value with other value desc. when merge value desc, it will merge values with the same reference. but for compound value, its reference have other meaning: 1) a < 1 or a > 10, this is a compound value, its reference is a; 2) a < 1 or b > 10, this is a compound value, its reference is 'a < 1 or b > 10'. then for expression `TA > 1 and FALSE or FALSE and SB > 'abc''`, for the operator OR, it will have two compound values: a. C1 = CompoundValue(referece = getCompoundExpression(TA > 1 and FALSE) = FALSE, source values={TA > 1, FALSE}) b. C2 = CompoundValue(reference = getCompoundExpression(FALSE and SB > 'abc') = FALSE, source values={FALSE, SB > 'abc'}) because the function getCompoundExpression will fold constant, then C1 andC2's referece will be 'FALSE', and since C1 and C2's reference equals, then will try merge C1 and C2, then will check merge ' > 1' and ' > abc' will cause the above exception. to fix this, for a compound value if its source values different reference (like a < 1 or b > 10), then don't merge it with other values descs.
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?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)