Feature request: implement boundary adjustment for timestamp types
enhancement
### Is your feature request related to a problem or challenge?
Yes, current implementation doesn't adjust timestamp-related types, which could lead to more partitions to be scanned during query.
### Describe the solution you'd like
The function [`project_binary`](https://github.com/apache/iceberg-rust/blob/4b13ad589d5b18a95d2b2c5709520c28c22db94a/crates/iceberg/src/spec/transform.rs#L658) adjusts boundary if possible.
It does 4 things:
- adjust boundary (i.e., boundary for '<' to boundary to '<=')
- transform (i.e., converts timestamp type to int type)
- fix negative value (i.e., timestamp earlier than epoch)
- adjust operator, which turns '<' to '<=', and '>' to '>='
Currently for operation (1), we don't support timestamp types
https://github.com/apache/iceberg-rust/blob/4b13ad589d5b18a95d2b2c5709520c28c22db94a/crates/iceberg/src/spec/transform.rs#L660-L683
Combined with (1) and (4), it's possible that we could scan more partitions than we should
For example, the query is ts < 2023-06-15T00:00:00Z (= micros value 1686787200000000)
Under the current impl,
- adjust_boundary: 1686787200000000 (unchanged)
- operator: turns from '<' to '<='
- day(1686787200000000) = 19523 (June 15th)
- result: p <= 19523, which scans June 15th too
### Willingness to contribute
I can contribute to this feature independently
关闭于 2026-05-19 0 条评论