ahmedabu98 commented on code in PR #32688:
URL: https://github.com/apache/beam/pull/32688#discussion_r1793501440
##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/IcebergUtils.java:
##########
@@ -54,6 +58,14 @@ private IcebergUtils() {}
.put(Schema.TypeName.DOUBLE, Types.DoubleType.get())
.put(Schema.TypeName.STRING, Types.StringType.get())
.put(Schema.TypeName.BYTES, Types.BinaryType.get())
+ .put(Schema.TypeName.DATETIME, Types.TimestampType.withoutZone())
+ .build();
+
+ private static final Map<String, Type> BEAM_LOGICAL_TYPES_TO_ICEBERG_TYPES =
+ ImmutableMap.<String, Type>builder()
+ .put(SqlTypes.DATE.getIdentifier(), Types.DateType.get())
+ .put(SqlTypes.TIME.getIdentifier(), Types.TimeType.get())
+ .put(SqlTypes.DATETIME.getIdentifier(),
Types.TimestampType.withoutZone())
Review Comment:
Btw I noticed that when reading `timestamptz` types from Iceberg, the
timestamp is always returned in UTC.
I wonder if it's something I'm doing on my side, or if this is expected
Iceberg behavior
--
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]