You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/28 02:12:25 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #5067: API: Support composite types in Accessors

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


##########
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:
   I think it should be fine to update the type ID classes.



-- 
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-unsubscribe@iceberg.apache.org

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


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