BiteTheDDDDt opened a new pull request, #63166:
URL: https://github.com/apache/doris/pull/63166

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary: Predicate inference stripped widening integral casts like 
CAST(INT AS BIGINT), which could derive invalid INT = BIGINT predicates and 
push them into scan common exprs. Scan-side datelike casts also dereferenced 
unexpected input columns directly, so bad runtime-filter/common-expr inputs 
could become BE crashes instead of errors.
   
   This patch keeps widening integral casts during predicate inference, adds BE 
cast input column validation, and adds a p0 regression derived from 
output/fmt.sql for the scan common expr failure.
   
   ### Release note
   
   Fix query failures or crashes caused by invalid inferred cast predicates in 
scan/runtime-filter paths.
   
   ### Check List (For Author)
   
   - Test: Manual test
       - BE format check: build-support/check-format.sh --files 
be/src/exprs/function/cast/cast_to_date.h
       - FE checkstyle: cd fe && mvn checkstyle:check -pl fe-core 
-Dcheckstyle.includes=src/main/java/org/apache/doris/nereids/util/PredicateInferUtils.java,src/test/java/org/apache/doris/nereids/rules/rewrite/UnequalPredicateInferTest.java
 -q
       - Manual SQL: full output/fmt.sql reproduces the old scan common expr 
error; disabling INFER_PREDICATES returns the expected rows
   - Behavior changed: Yes, integral widening casts are no longer stripped for 
predicate inference
   - Does this need documentation: No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to