Package org.apache.iceberg
Class Accessors
- java.lang.Object
-
- org.apache.iceberg.Accessors
-
public class Accessors extends java.lang.Object
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 like this:row.get(p0, StructLike.class).get(p1, StructLike.class).get(p2, javaClass)
. Commonly, Nested fields with depth=1 or 2 or 3 are the fields that will be accessed frequently, so this optimization will help to access this kind of schema. For schema whose depth is deeper than 3, then we will use theAccessors.WrappedPositionAccessor
to access recursively.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Integer
toPosition(Accessor<StructLike> accessor)
-
-
-
Method Detail
-
toPosition
public static java.lang.Integer toPosition(Accessor<StructLike> accessor)
-
-