samredai commented on code in PR #4609:
URL: https://github.com/apache/iceberg/pull/4609#discussion_r855654244
##########
python/src/iceberg/expressions/base.py:
##########
@@ -122,3 +124,37 @@ def __le__(self, other):
def __ge__(self, other):
return self.value >= other.value
+
+
+class Accessor(Generic[T], ABC):
+ """An accessor for a specific position in a container of type T
Review Comment:
You're right, I think I was under the impression that we'd have
implementations of this class but this is a class that will be instantiated and
used directly right? Something like:
```py
container = FooStruct()
container.set(0, "foo")
value = Accessor(position=0, iceberg_type=StringType).get(container)
print(value) # "foo"
```
Does that look right?
--
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]