rdblue commented on code in PR #9008: URL: https://github.com/apache/iceberg/pull/9008#discussion_r1558262073
########## api/src/main/java/org/apache/iceberg/expressions/ExpressionUtil.java: ########## @@ -600,6 +612,12 @@ private static String sanitizeString(CharSequence value, long now, int today) { } else if (TIMESTAMPTZ.matcher(value).matches()) { Literal<Long> ts = Literal.of(value).to(Types.TimestampType.withZone()); return sanitizeTimestamp(ts.value(), now); + } else if (TIMESTAMPNS.matcher(value).matches()) { + Literal<Long> ts = Literal.of(value).to(Types.TimestampNanoType.withoutZone()); + return sanitizeTimestamp(ts.value() / 1000, now); + } else if (TIMESTAMPTZNS.matcher(value).matches()) { + Literal<Long> ts = Literal.of(value).to(Types.TimestampNanoType.withZone()); + return sanitizeTimestamp(ts.value() / 1000, now); Review Comment: Is it safe to divide or do we need to use `Math.floorDiv`? I think we use that function in other places. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org