Ankitkj1999 commented on PR #18941:
URL: https://github.com/apache/iceberg/pull/18941#issuecomment-7059453685

   @developer-rpai @jiwen624 Thank you for the guidance! I have updated the PR 
accordingly:
   
   1. **UnboundPredicate binding simplification:** `bindLiteralOperation` now 
simplifies `LT` on type minimums and `GT` on type maximums to 
`Expressions.alwaysFalse()` for `INTEGER`, `LONG`, `DATE`, `TIME`, `TIMESTAMP`, 
and `TIMESTAMP_NANO`. This restores full partition pruning at scan planning 
time.
   2. **Safe literal conversion:** In 
`Literals.TimestampLiteral.to(TIMESTAMP_NANO)`, guarded `microsToNanos` against 
overflow by returning `belowMin()` / `aboveMax()`.
   3. **Retained ProjectionUtil guards:** Kept the boundary checks returning 
`null` in `truncateInteger`, `truncateIntegerStrict`, `truncateLong`, and 
`truncateLongStrict` so directly evaluated bound comparisons and strict 
projection paths remain protected against arithmetic wrap-around.
   4. **Tests:** Added boundary test cases covering `TestExpressionBinding`, 
`TestTruncatesProjection`, `TestDatesProjection`, and 
`TestTimestampsProjection`.
   


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