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

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: N/A
   
   Problem Summary:
   
   FileScannerV2 localized predicate literals to the file column type whenever 
conversion succeeded, even if the conversion changed the literal value. This 
could make file-level filtering less selective than the original table 
predicate and silently drop matching rows. For example, rewriting a DOUBLE 
predicate `value < 1.5` for an INT file column to `value < 1` incorrectly 
rejects a file value of `1`.
   
   This change requires literal conversion to round-trip exactly through the 
file type before localization. Exact conversions such as `BIGINT 1 -> INT 1 -> 
BIGINT 1` continue to use the file-local predicate. Lossy conversions fall back 
to casting the file slot and retain the original table-typed literal.
   
   ### Release note
   
   Fix FileScannerV2 predicate localization to avoid missing rows after lossy 
literal conversion.
   
   ### Check List (For Author)
   
   - Test: Unit Test
       - `ColumnMapperCastTest.ColumnMapperRejectsLossyBinaryLiteralConversion`
       - 
`ColumnMapperCastTest.ColumnMapperRejectsLossyInPredicateLiteralConversion`
       - Existing safe binary and IN literal conversion tests
   - Behavior changed: Yes. Lossy literal conversions now fall back to casting 
the file slot.
   - Does this need documentation: No
   
   Validation on the designated Linux build host:
   
   - `build-support/check-format.sh`
   - Targeted BE unit tests: 4 tests passed
   - `run-clang-tidy.sh` was attempted; it is blocked by pre-existing 
diagnostics in the file and toolchain/header diagnostics unrelated to the 
changed lines.
   


-- 
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