RussellSpitzer commented on code in PR #5067:
URL: https://github.com/apache/iceberg/pull/5067#discussion_r907612627


##########
api/src/main/java/org/apache/iceberg/Accessors.java:
##########
@@ -56,14 +56,30 @@ static Map<Integer, Accessor<StructLike>> forSchema(Schema 
schema) {
   }
 
   private static class PositionAccessor implements Accessor<StructLike> {
-    private int position;
+    private final int position;
     private final Type type;
     private final Class<?> javaClass;
 
     PositionAccessor(int pos, Type type) {
       this.position = pos;
       this.type = type;
-      this.javaClass = type.typeId().javaClass();
+
+      switch (type.typeId()) {
+        case MAP:
+          this.javaClass = Map.class;

Review Comment:
   Currently in the Type.java Enum we have this set as "void.class", is it 
possible for us to just change it there? Or is there a reason that doing that 
will break things?
   
   
https://github.com/apache/iceberg/blob/ecd35afa436f093656fb66c981a51a56ed687af0/api/src/main/java/org/apache/iceberg/types/Type.java#L43-L45



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