You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5f107ef
Browse filesBrowse the repository at this point in the historyBrowse files
[fix](rbo) Preserve semantics in predicate inference (apache#67919)
### What problem does this PR solve?
Problem Summary:
Fix two predicate inference errors that change query results:
- `chooseInputPredicates` records a retained `GT`/`GTE` predicate as
`EQ`. The false equality can make another necessary predicate appear
redundant. For example, `a > b AND rn > b AND a > rn` can lose `a > rn`
and return extra rows in a QUALIFY query. Record the actual relation in
the working graph.
- Comparison-equal operands are not interchangeable inside arbitrary
expressions. DATE and DATETIME values can compare equal but have
different string lengths; negative and positive floating-point zero
compare equal but have different SIGNBIT results. Substitution can
therefore add filters that discard matching rows. Restrict expression
substitution to exactly matching supported scalar types with
value-preserving equality. Preserve direct comparisons, IN and their
negations on the unwrapped operand, along with the existing determinism
and cast-analysis checks.
The fixes are in separate commits. Shared cast extraction is unchanged,
and existing regression expectations are unchanged.
### Release note
Fix extra or missing rows caused by incorrect predicate inference,
including QUALIFY inequality chains and substitutions inside
type-sensitive or representation-sensitive expressions.
Copy file name to clipboardExpand all lines: fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ProjectOtherJoinConditionForNestedLoopJoin.java
0 commit comments