public class DictBuilder extends Object
TupleSchema).
Key can be TypeProtos.DataMode.REQUIRED primitive,
while value can be primitive or complex.
Column is added to the parent container during creation and all resumeXXX methods return qualified parent container.
DictVector| Constructor and Description |
|---|
DictBuilder(org.apache.drill.exec.record.metadata.SchemaContainer parent,
String name,
TypeProtos.DataMode mode) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(ColumnMetadata column) |
void |
build() |
DictColumnMetadata |
buildColumn() |
DictBuilder |
dictArrayValue() |
DictBuilder |
dictValue() |
DictBuilder |
key(TypeProtos.MajorType type)
Use this method to set types with width or scale and precision,
e.g.
|
DictBuilder |
key(TypeProtos.MinorType type) |
UnionBuilder |
listValue() |
MapBuilder |
mapArrayValue() |
MapBuilder |
mapValue() |
DictBuilder |
nullableValue(TypeProtos.MinorType type) |
RepeatedListBuilder |
repeatedListValue() |
DictBuilder |
repeatedValue(TypeProtos.MinorType type) |
DictBuilder |
resumeDict() |
RepeatedListBuilder |
resumeList() |
MapBuilder |
resumeMap() |
SchemaBuilder |
resumeSchema() |
UnionBuilder |
resumeUnion() |
UnionBuilder |
unionValue() |
DictBuilder |
value(TypeProtos.MajorType type)
Define non-complex value type.
|
DictBuilder |
value(TypeProtos.MinorType type) |
public DictBuilder(org.apache.drill.exec.record.metadata.SchemaContainer parent,
String name,
TypeProtos.DataMode mode)
public void addColumn(ColumnMetadata column)
public DictBuilder key(TypeProtos.MinorType type)
public DictBuilder key(TypeProtos.MajorType type)
TypeProtos.MinorType.VARDECIMAL with scale and precision or
TypeProtos.MinorType.VARCHAR etc.type - desired type for keythis builderIllegalStateException - if key field is already setIllegalArgumentException - if type is not supported (either complex or nullable)public DictBuilder value(TypeProtos.MinorType type)
public DictBuilder nullableValue(TypeProtos.MinorType type)
public DictBuilder repeatedValue(TypeProtos.MinorType type)
public DictBuilder value(TypeProtos.MajorType type)
mapValue(), mapArrayValue() etc.type - desired non-complex type for value.this builderIllegalStateException - if value is already setIllegalArgumentException - if type is either MAP,
LIST, DICT or UNION.method to define value as {@code MAP},
method to define value as {@code REPEATED MAP},
method to define value as {@code LIST},
method to define value as {@code UNION},
method to define value as {@code DICT},
method to define value as {@code REPEATED DICT}public MapBuilder mapValue()
public MapBuilder mapArrayValue()
public DictBuilder dictValue()
public DictBuilder dictArrayValue()
public UnionBuilder unionValue()
public UnionBuilder listValue()
public RepeatedListBuilder repeatedListValue()
public DictColumnMetadata buildColumn()
public void build()
public SchemaBuilder resumeSchema()
public MapBuilder resumeMap()
public RepeatedListBuilder resumeList()
public UnionBuilder resumeUnion()
public DictBuilder resumeDict()
Copyright © 2021 The Apache Software Foundation. All rights reserved.