rdblue commented on code in PR #11775:
URL: https://github.com/apache/iceberg/pull/11775#discussion_r2255504071
##########
api/src/main/java/org/apache/iceberg/expressions/Literals.java:
##########
@@ -300,8 +300,7 @@ public <T> Literal<T> to(Type type) {
case TIMESTAMP:
return (Literal<T>) new TimestampLiteral(value());
case TIMESTAMP_NANO:
- // assume micros and convert to nanos to match the behavior in the
timestamp case above
- return new TimestampLiteral(value()).to(type);
+ return (Literal<T>) new TimestampNanoLiteral(value());
Review Comment:
I just opened #13747 with fixes for the problems raised by this thread. It
adds `millis`, `micros`, and `nanos` methods to `Expressions` that construct
timestamp literals from long values. I also updated `Literals.from` so that
these literals can be passed when creating `in` expressions (see the
[test](https://github.com/apache/iceberg/pull/13747/files#diff-26e943160c86dac046e620ca3844a909ac22c3f1a06e63671b6e8b2484ab3fddR87)).
--
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]