jiwen624 opened a new pull request, #18478:
URL: https://github.com/apache/iceberg/pull/18478

   Closes issue TODO - will file it soon.
   
   `IN`/`NOT IN` filters with two or more values on an identity-partitioned 
`timestamp_ns` column fail scan planning with `ArithmeticException: long 
overflow`, while for dates near 1970 they silently skip matching files instead, 
and NOT IN deletes remove files they should keep. The identity projection 
rebuilt the partition predicate from raw long values, and rebinding read them 
as microseconds. **The fix**: for timestamp_ns columns, Identity now wraps each 
IN/NOT IN value with Expressions.nanos(...), so the partition predicate keeps 
nanosecond values.
   ```Java
    table.newScan().filter(Expressions.in("ts",
        "2026-01-01T00:00:00.000000001", 
"2025-01-01T00:00:00.000000001")).planFiles();
    // before: ArithmeticException: long overflow    after: plans the matching 
file
   ```
    **Test plan**: `TestProjection.identityProjectionOfTimestampNanoIn` fails 
without the fix and passes with it.


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