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


##########
core/src/main/java/org/apache/iceberg/data/avro/DataReader.java:
##########
@@ -49,21 +49,37 @@ public static <D> DataReader<D> create(
 
   public static <D> DataReader<D> create(
       org.apache.iceberg.Schema expectedSchema, Schema readSchema, 
Map<Integer, ?> idToConstant) {
-    return new DataReader<>(expectedSchema, readSchema, idToConstant);
+    return create(expectedSchema, readSchema, idToConstant, true);
+  }
+
+  public static <D> DataReader<D> create(

Review Comment:
   I took a closer look at `AvroSchemaUtil.buildAvroProjection`, 
`BuildAvroProjection` and `ProjectionDatumReader`.
   
   Internally, `AvroSchemaUtil.buildAvroProjection` is only called in 
`ParquetReadSupport` (see my comment above) and in `ProjectionDatumReader`. 
`BuildAvroProjection` is package-private. `ProjectionDatumReader` is never used 
across Iceberg modules: `Avro` always gets `createResolvingReaderFunc` and the 
deprecated `RawDecoder` constructor is unused.
   
   External usages should be updated to support Avro native timestamps and the 
`adjust-to-utc-default` schema property.
   
   Dropped the `localTimestampEnabled` parameter, so missing Iceberg fields' 
types are always converted with `localTimestampEnabled=true` 
(e042c7f86c25ef6db45fba06a031833d92b4d067).



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