Skip to content

branch-4.1: [fix](planner) align legacy literal compareLiteral with Nereids ComparableLiteral semantics (#63481)#63874

Merged
yiguolei merged 1 commit into
apache:branch-4.1from
csun5285:pick-63481-to-4.1
May 30, 2026
Merged

branch-4.1: [fix](planner) align legacy literal compareLiteral with Nereids ComparableLiteral semantics (#63481)#63874
yiguolei merged 1 commit into
apache:branch-4.1from
csun5285:pick-63481-to-4.1

Conversation

@csun5285

Copy link
Copy Markdown
Contributor

pick from master #63481

@csun5285
csun5285 requested a review from yiguolei as a code owner May 29, 2026 02:55
@hello-stephen

Copy link
Copy Markdown
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?

@csun5285

Copy link
Copy Markdown
Contributor Author

run buildall

…ereids ComparableLiteral semantics (apache#63481)

IPv4Literal/IPv6Literal.compareLiteral both used to return 0
unconditionally, making any two IP literals appear equal to
LiteralExpr.equals(). The downstream effect:

  WHERE ip4 != '1.1.1.1' AND ip4 != '1.1.1.2'

collapsed to just the first conjunct during Set<Expr> dedup inside the
legacy planner's ScanNode.expressionToRanges / PartitionColumnFilter /
HashDistributionPruner paths. Same shape for NOT BETWEEN and NOT IN.
Multiple rows that should have been filtered out leaked through, and
EXPLAIN only showed the first predicate.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@csun5285
csun5285 force-pushed the pick-63481-to-4.1 branch from fbe6af0 to 1db7234 Compare May 29, 2026 04:15
@csun5285

Copy link
Copy Markdown
Contributor Author

run buildall

1 similar comment
@yiguolei

Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 71.43% (30/42) 🎉
Increment coverage report
Complete coverage report

@yiguolei
yiguolei merged commit 314f9c1 into apache:branch-4.1 May 30, 2026
26 of 29 checks passed
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.

3 participants