thswlsqls opened a new issue, #10402:
URL: https://github.com/apache/paimon/issues/10402

   
   **Search before asking**
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   **Paimon version**
   master @ 561ff302e (2.2-SNAPSHOT)
   
   **Compute Engine**
   Hive
   
   **Minimal reproduce step**
   1. Create a Paimon append table with `c DECIMAL(5, 2)`; write `1.00`, 
`1.01`, `999.99`, one commit (data file) each.
   2. Query it from Hive:
      - `SELECT * FROM t WHERE c < 1000` returns 0 rows (expected 3).
      - `SELECT * FROM t WHERE c > 1.005` returns only `999.99` (expected 
`1.01` and `999.99`).
   
   Both occur with Hive's default CBO. With `hive.cbo.enable=false`, 
`tinyint_col < 200` and `int_col < 3000000000` also return 0 rows.
   
   **What doesn't meet your expectations?**
   A literal that does not fit the column type drops matching rows.
   
   **Anything else?**
   Hive does not cast the literal to the column type. 
`SearchArgumentToPredicateConverter.toLiteral()` passes it to 
`PredicateBuilder.convertJavaObject`, which rounds a decimal to the column 
scale, returns null above the precision, and wraps out-of-range integers. The 
altered predicate drives stats-based file skipping, which Hive's residual 
filter cannot undo.
   
   **Are you willing to submit a PR?**
   - [x] I'm willing to submit a PR!
   
   


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