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


##########
core/src/main/java/org/apache/iceberg/avro/AvroSchemaUtil.java:
##########
@@ -56,37 +56,75 @@ private AvroSchemaUtil() {}
   private static final Schema.Type RECORD = Schema.Type.RECORD;
 
   public static Schema convert(org.apache.iceberg.Schema schema, String 
tableName) {
-    return convert(schema, ImmutableMap.of(schema.asStruct(), tableName));
+    return convert(schema, tableName, true);
+  }
+
+  public static Schema convert(

Review Comment:
   Even after dropping the condition for `local-timestamp-*`, setting 
`legacyTimestampMapping` to `false` still leads to the following differences 
compared to `legacyTimestampMapping=true`:
   1. Avro `timestamp-*` without the `adjust-to-utc` property is converted to 
Iceberg `timestamptz(_ns)` (instead of `timestamp(_ns)`)
   2. Iceberg `timestamptz(_ns)` is converted to Avro `timestamp-*` without the 
`adjust-to-utc` property (instead of `timestamp-*` with `adjust-to-utc=true`)
   3. Iceberg `timestamp(_ns)` is converted to Avro `local-timestamp-*` 
(instead of `timestamp-*` with `adjust-to-utc=false`)
   
   So, the question is not, "Do we want Avro `local-timestamp-*` to Iceberg 
`timestamp(_ns)` conversion support to be flagged with 
`legacyTimestampMapping`?". Rather, the question is, "Do we want to provide 
public methods that follow Avro semantics during round-trip conversions"?
   
   Are we on the same page, @RussellSpitzer ?
   
   upd: I saw your message below. Let's continue this discussion in the main 
thread.



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