Package org.apache.iceberg.util
Class StructProjection
java.lang.Object
org.apache.iceberg.util.StructProjection
- All Implemented Interfaces:
StructLike
-
Method Summary
Modifier and TypeMethodDescriptioncopyFor(StructLike newStruct) static StructProjectionCreates a projecting wrapper forStructLikerows.static StructProjectionCreates a projecting wrapper forStructLikerows.static StructProjectioncreate(Types.StructType structType, Types.StructType projectedStructType) Creates a projecting wrapper forStructLikerows.static StructProjectioncreateAllowMissing(Types.StructType structType, Types.StructType projectedStructType) Creates a projecting wrapper forStructLikerows.<T> T<T> voidset(int pos, T value) intsize()wrap(StructLike newStruct)
-
Method Details
-
create
Creates a projecting wrapper forStructLikerows.This projection does not work with repeated types like lists and maps.
- Parameters:
schema- schema of rows wrapped by this projectionids- field ids from the row schema to project- Returns:
- a wrapper to project rows
-
create
Creates a projecting wrapper forStructLikerows.This projection does not work with repeated types like lists and maps.
- Parameters:
dataSchema- schema of rows wrapped by this projectionprojectedSchema- result schema of the projected rows- Returns:
- a wrapper to project rows
-
create
public static StructProjection create(Types.StructType structType, Types.StructType projectedStructType) Creates a projecting wrapper forStructLikerows.This projection does not work with repeated types like lists and maps.
- Parameters:
structType- type of rows wrapped by this projectionprojectedStructType- result type of the projected rows- Returns:
- a wrapper to project rows
-
createAllowMissing
public static StructProjection createAllowMissing(Types.StructType structType, Types.StructType projectedStructType) Creates a projecting wrapper forStructLikerows.This projection allows missing fields and does not work with repeated types like lists and maps.
- Parameters:
structType- type of rows wrapped by this projectionprojectedStructType- result type of the projected rows- Returns:
- a wrapper to project rows
-
wrap
-
copyFor
-
size
public int size()- Specified by:
sizein interfaceStructLike
-
get
- Specified by:
getin interfaceStructLike
-
set
public <T> void set(int pos, T value) - Specified by:
setin interfaceStructLike
-