rdblue commented on code in PR #4525:
URL: https://github.com/apache/iceberg/pull/4525#discussion_r876056384
##########
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. You can see how
we're doing it here, but there is no need to change the `Literals` API
--
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]