public class StructProjection extends java.lang.Object implements StructLike
| Modifier and Type | Method and Description |
|---|---|
static StructProjection |
create(Schema dataSchema,
Schema projectedSchema)
Creates a projecting wrapper for
StructLike rows. |
static StructProjection |
create(Schema schema,
java.util.Set<java.lang.Integer> ids)
Creates a projecting wrapper for
StructLike rows. |
<T> T |
get(int pos,
java.lang.Class<T> javaClass) |
<T> void |
set(int pos,
T value) |
int |
size() |
StructProjection |
wrap(StructLike newStruct) |
public static StructProjection create(Schema schema, java.util.Set<java.lang.Integer> ids)
StructLike rows.
This projection does not work with repeated types like lists and maps.
schema - schema of rows wrapped by this projectionids - field ids from the row schema to projectpublic static StructProjection create(Schema dataSchema, Schema projectedSchema)
StructLike rows.
This projection does not work with repeated types like lists and maps.
dataSchema - schema of rows wrapped by this projectionprojectedSchema - result schema of the projected rowspublic StructProjection wrap(StructLike newStruct)
public int size()
size in interface StructLikepublic <T> T get(int pos,
java.lang.Class<T> javaClass)
get in interface StructLikepublic <T> void set(int pos,
T value)
set in interface StructLike