dentiny opened a new issue, #2421:
URL: https://github.com/apache/iceberg-rust/issues/2421

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


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