public class BatchSchema extends Object implements Iterable<MaterializedField>
| Modifier and Type | Class and Description |
|---|---|
static class |
BatchSchema.SelectionVectorMode |
| Constructor and Description |
|---|
BatchSchema(BatchSchema.SelectionVectorMode selectionVector,
List<MaterializedField> fields) |
| Modifier and Type | Method and Description |
|---|---|
BatchSchema |
clone() |
boolean |
equals(Object obj) |
MaterializedField |
getColumn(int index) |
int |
getFieldCount() |
BatchSchema.SelectionVectorMode |
getSelectionVectorMode() |
int |
hashCode() |
boolean |
isEquivalent(BatchSchema other) |
Iterator<MaterializedField> |
iterator() |
BatchSchema |
merge(BatchSchema otherSchema)
Merge two schema to produce a new, merged schema.
|
static SchemaBuilder |
newBuilder() |
String |
toString() |
public BatchSchema(BatchSchema.SelectionVectorMode selectionVector, List<MaterializedField> fields)
public static SchemaBuilder newBuilder()
public int getFieldCount()
public MaterializedField getColumn(int index)
public Iterator<MaterializedField> iterator()
iterator in interface Iterable<MaterializedField>public BatchSchema.SelectionVectorMode getSelectionVectorMode()
public BatchSchema clone()
public boolean isEquivalent(BatchSchema other)
public BatchSchema merge(BatchSchema otherSchema)
Merging data with selection vectors is unlikely to be useful, or work well. With a selection vector, the two record batches would have to be correlated both in their selection vectors AND in the underlying vectors. Such a use case is hard to imagine. So, for now, this method forbids merging schemas if either of them carry a selection vector. If we discover a meaningful use case, we can revisit the issue.
otherSchema - the schema to merge with this oneCopyright © 2017 The Apache Software Foundation. All rights reserved.