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


##########
core/src/main/java/org/apache/iceberg/avro/Avro.java:
##########
@@ -716,6 +717,11 @@ public <D> AvroIterable<D> build() {
         reader = (DatumReader<D>) defaultCreateReaderFunc.apply(schema);
       }
 
+      if (reader instanceof InternalReader) {

Review Comment:
   I think the right way to fix this is to introduce a `SupportsConstants` 
interface like `SupportsCustomRecords` and add more tests for the API we add 
there. That wouldn't actually be useful until we also expose constants methods 
on this builder itself. I'm reluctant to do all of that just to get the path 
right now, so I'm leaning toward adding this as it is now and updating it later 
when we decide we want to handle constants differently. (There's also a bit of 
clean up to do in the format models if we change how this works.)



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