dimas-b commented on code in PR #5067:
URL: https://github.com/apache/iceberg/pull/5067#discussion_r907636938
##########
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:
Yeah, I saw other places where current code did a custom java type choosing,
so I did not want to change the enum without a good reason. I'll look more into
this presently.
--
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]