jackye1995 commented on a change in pull request #2074:
URL: https://github.com/apache/iceberg/pull/2074#discussion_r556185865
##########
File path: api/src/main/java/org/apache/iceberg/Accessors.java
##########
@@ -76,6 +76,20 @@ public String toString() {
}
}
+ /**
Review comment:
Since you are describing both Position2Accessor and Position3Accessor, I
think it makes more sense to move this documentation up to the `public class
Accessors`, so that javadoc can be generated.
##########
File path: api/src/main/java/org/apache/iceberg/Accessors.java
##########
@@ -76,6 +76,20 @@ public String toString() {
}
}
+ /**
+ * Position2Accessor and Position3Accessor here is an optimization. For a
nested schema like:
+ *
+ * root
+ * |-- a: struct (nullable = false)
+ * | |-- b: struct (nullable = false)
+ * | | -- c: string (containsNull = false)
+ *
+ * Then we will use Position3Accessor to access nested field 'c'. It can be
accessed by call
+ * row.get(p0, StructLike.class).get(p1, StructLike.class).get(p2,
javaClass) directly.
+ * Commonly, Nested fields with depth=1 or 2 or 3 are the fields that will
be accessed frequently, so this
Review comment:
nit: change line after `,` or `.`, same comment also for the next 2
lines.
##########
File path: api/src/main/java/org/apache/iceberg/Accessors.java
##########
@@ -76,6 +76,20 @@ public String toString() {
}
}
+ /**
+ * Position2Accessor and Position3Accessor here is an optimization. For a
nested schema like:
+ *
+ * root
+ * |-- a: struct (nullable = false)
+ * | |-- b: struct (nullable = false)
+ * | | -- c: string (containsNull = false)
+ *
+ * Then we will use Position3Accessor to access nested field 'c'. It can be
accessed by call
+ * row.get(p0, StructLike.class).get(p1, StructLike.class).get(p2,
javaClass) directly.
Review comment:
nit: make this in `{@code}` or `<pre></pre>` block.
----------------------------------------------------------------
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]