rdblue commented on code in PR #4525: URL: https://github.com/apache/iceberg/pull/4525#discussion_r863325599
########## api/src/main/java/org/apache/iceberg/expressions/Literals.java: ########## @@ -419,6 +420,9 @@ static class TimeLiteral extends ComparableLiteral<Long> { public <T> Literal<T> to(Type type) { if (type.typeId() == Type.TypeID.TIME) { return (Literal<T>) this; + } else if (type.typeId() == Type.TypeID.STRING) { + return (Literal<T>) new StringLiteral(LocalTime.ofNanoOfDay(value() * 1000) + .format(DateTimeFormatter.ISO_LOCAL_TIME)); Review Comment: I don't think this conversion should be done using literals. Instead, use the methods in `DateTimeUtil` and add any new methods there. This shouldn't require changes to the public API in expressions. -- 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