rdblue commented on a change in pull request #1219:
URL: https://github.com/apache/iceberg/pull/1219#discussion_r466019457



##########
File path: core/src/main/java/org/apache/iceberg/data/avro/GenericReaders.java
##########
@@ -133,4 +143,40 @@ protected void set(Record struct, int pos, Object value) {
       struct.set(pos, value);
     }
   }
+
+  private static class InternalRecordReader<R extends Record> extends 
ValueReaders.StructReader<R> {
+    private final Class<R> recordClass;
+    private final DynConstructors.Ctor<R> ctor;
+    private final Schema schema;
+
+    InternalRecordReader(List<ValueReader<?>> readers, Class<R> recordClass, 
Schema schema,
+                         Map<Integer, ?> idToConstant) {

Review comment:
       I see the need for a reader that produces records of some specific 
class. I don't understand why that needs to accept an Avro schema, though. The 
only requirement should be that the class implements StructLike and accepts an 
Iceberg schema to set its projection.




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

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