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

   
   ### Purpose
   
   fix #10402
   
   - Hive does not cast SARG literals to the column type, so 
`convertJavaObject` rounds or nulls a DECIMAL literal (`1.005`, `1000` for 
`DECIMAL(5, 2)`) and wraps an out-of-range TINYINT/SMALLINT/INT literal (with 
`hive.cbo.enable=false`).
   - The altered predicate drives stats-based file skipping, so files with 
matching rows are dropped and Hive's residual filter cannot recover them.
   - `toLiteral()` now throws `UnsupportedOperationException` when the 
converted literal differs from the Hive value, so `convert()` leaves that 
conjunct to Hive (same fallback as #9448). This only reduces pushdown; no query 
newly fails.
   
   ### Tests
   
   - `SearchArgumentToPredicateConverterTest`: new cases for decimal 
precision/scale overflow, integer overflow, and representable controls. The 
three overflow cases fail without the fix.
   - 
`HiveReadITCaseBase#testPredicatePushDownWithLiteralsNotRepresentableInColumnType`
 (MR and Tez): one file per row; returns `[]` for `c < 1000` without the fix.
   - `mvn -pl paimon-hive/paimon-hive-connector-common clean install` (JDK 11): 
202 tests, 0 failures.
   
   
   


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