kinolaev commented on code in PR #17196:
URL: https://github.com/apache/iceberg/pull/17196#discussion_r3596702234


##########
core/src/main/java/org/apache/iceberg/avro/SchemaToType.java:
##########
@@ -193,19 +196,30 @@ public Type logicalType(Schema primitive, LogicalType 
logical) {
 
     } else if (logical instanceof LogicalTypes.TimestampMillis
         || logical instanceof LogicalTypes.TimestampMicros) {
-      if (AvroSchemaUtil.isTimestamptz(primitive)) {
+      if (AvroSchemaUtil.isTimestamptz(primitive, legacyTimestampMapping)) {
         return Types.TimestampType.withZone();
       } else {
         return Types.TimestampType.withoutZone();
       }
 
     } else if (logical instanceof LogicalTypes.TimestampNanos) {
-      if (AvroSchemaUtil.isTimestamptz(primitive)) {
+      if (AvroSchemaUtil.isTimestamptz(primitive, legacyTimestampMapping)) {
         return Types.TimestampNanoType.withZone();
       } else {
         return Types.TimestampNanoType.withoutZone();
       }
 
+    } else if (logical instanceof LogicalTypes.LocalTimestampMillis

Review Comment:
   Thanks @RussellSpitzer !
   
   > There was a request on the PR to preserve this behavior in the API via a 
parameter
   
   To be precise, I'm not requesting to preserve this behavior. As I mentioned 
above, I added the condition for `local-timestamp-*` only to avoid discussions 
about breaking changes. Personally, I am all for unconditional 
`local-timestamp-*` support!



-- 
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]

Reply via email to