openinx commented on issue #2049:
URL: https://github.com/apache/iceberg/issues/2049#issuecomment-756535921
@simonsssu It's an optimization for accessing nested field. For example,
we have the schema:
```
root
|-- a: struct (nullable = false)
| |-- b: struct (nullable = false)
| | -- c: string (containsNull = false)
```
We could just use the `Position3Accessor` to access the nested field `c`
(Because it just access the nested field straightforward : `row.get(p0,
StructLike.class).get(p1, StructLike.class).get(p2, javaClass);` ).
Of course, it won't break the correctness if we remove that optimization,
then we will use the `WrappedPositionAccessor` to access field `c` recursively,
that's a more complex stack trace which may consume more resources.
But I think it's good to keep the optimization because the nested fields
with depth=1 or 2 or 3 are the fields that will be accessed with the highest
frequency.
----------------------------------------------------------------
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]