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


##########
python/src/iceberg/schema.py:
##########
@@ -262,10 +267,52 @@ def primitive(self, primitive: PrimitiveType) -> T:
         ...  # pragma: no cover
 
 
+@dataclass(init=True, eq=True)
+class Accessor:
+    """An accessor for a specific position in a container that implements the 
StructProtocol"""
+
+    position: int
+    inner: Optional["Accessor"] = None
+
+    def __str__(self):
+        return f"Accessor(position={self.position},inner={self.inner})"
+
+    def __repr__(self):
+        return self.__str__()
+
+    def with_inner(self, accessor: "Accessor") -> "Accessor":

Review Comment:
   Is there a better name for this method? It sounds like it should replace 
this accessor's `inner` field, but it actually sets the leaf `inner`. Maybe 
`with_inner_most`?



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