pingxin403 commented on issue #19322:
URL: https://github.com/apache/iceberg/issues/19322#issuecomment-7425869175

   I'd like to take this. Binding converts the literal with `Literal.to(type)`, 
and the timestamp-to-date conversions floor the value, but the bound predicate 
keeps the original operator, so `d < TIMESTAMP '2023-01-05 12:00:00'` becomes 
`d < DATE '2023-01-05'`. I'm adjusting the operator when the conversion 
truncates (`<` and `<=` become `<=` on the floored day, `>` and `>=` become 
`>=` and `>`), making `=` unsatisfiable and `!=` always true for a timestamp 
that is not exactly midnight, and dropping such values from `IN` lists; 
nanoseconds bounded to microseconds are adjusted the same way. Tests cover each 
operator plus the nanosecond case. One question: is always-false the outcome 
you expect for `=`, or would you rather it expand to a range over that day?


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