rdblue commented on code in PR #9366:
URL: https://github.com/apache/iceberg/pull/9366#discussion_r1439064577


##########
core/src/main/java/org/apache/iceberg/avro/Avro.java:
##########
@@ -683,23 +698,34 @@ public ReadBuilder classLoader(ClassLoader classLoader) {
       return this;
     }
 
+    @SuppressWarnings("unchecked")
     public <D> AvroIterable<D> build() {
       Preconditions.checkNotNull(schema, "Schema is required");
-      Function<Schema, DatumReader<?>> readerFunc;
+
+      if (null == nameMapping) {
+        this.nameMapping = MappingUtil.create(schema);
+      }
+
+      DatumReader<D> reader;

Review Comment:
   I don't think it is necessary in this case. The compiler will catch if it is 
unset because no default was provided.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to