Zerolzj opened a new pull request, #10981:
URL: https://github.com/apache/paimon/pull/10981

   ### Purpose
   
   Preserve binary literal contents when Flink predicate pushdown implicitly 
widens BINARY to VARBINARY.
   
   `PredicateConverter.extractLiteral` converts differing logical roots through 
`value.toString()`. For a `byte[]`, that string identifies the Java array 
rather than representing the SQL bytes, so comparisons can be pushed with 
incorrect bounds and omit matching rows.
   
   Handle lossless BINARY-to-VARBINARY widening as bytes. Leave unsupported 
binary conversions to Flink's residual filter rather than pushing an incorrect 
predicate. No storage-format or dependency changes.
   
   ### Tests
   
   Added `BinaryLiteralPredicateConverterTest` covering all six comparisons in 
both operand orders, bounded widening and same-root VARBINARY literals, 
high-bit/zero bytes, NULL, and unsupported narrowing.
   
   On community master `de6ac4a23094230047052a0fc42f595bfe1c99da`, the new 
tests reproduce the defect before the fix (1 failure and 1 error among 4 
tests). After the fix, the new tests and existing `PredicateConverterTest` pass 
under both `flink1` and `flink2`: 67 tests per profile, no 
failures/errors/skips.
   
   ```sh
   mvn -B -Pflink1 -pl paimon-flink/paimon-flink-common -am \
     -Dtest=BinaryLiteralPredicateConverterTest,PredicateConverterTest \
     -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false test
   mvn -B -Pflink2 -pl paimon-flink/paimon-flink-common -am \
     -Dtest=BinaryLiteralPredicateConverterTest,PredicateConverterTest \
     -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false clean test
   ```
   
   Both selected reactors passed with normal build checks enabled and public 
Maven repository settings. This is targeted converter coverage, not the full 
project test suite or an end-to-end SQL scan test.
   
   Generated-by: OpenAI Codex (GPT-5)
   


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

Reply via email to