Class TupleBuilder
java.lang.Object
org.apache.drill.exec.record.metadata.TupleBuilder
Internal tuple builder shared by the schema and map builders.
Those two classes can't inherit from this class because their
versions of the "add" methods return themselves to allow fluent
construction.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(String name, TypeProtos.MajorType type) voidadd(String name, TypeProtos.MinorType type) voidadd(String name, TypeProtos.MinorType type, int width) voidadd(String name, TypeProtos.MinorType type, TypeProtos.DataMode mode) voidadd(MaterializedField col) voidaddArray(String name, TypeProtos.MinorType type) voidaddArray(String name, TypeProtos.MinorType type, int dims) Add a multi-dimensional array, implemented as a repeated vector along with 0 or more repeated list vectors.voidaddColumn(ColumnMetadata column) voidaddDecimal(String name, TypeProtos.MinorType type, TypeProtos.DataMode mode, int precision, int scale) addDictArray(org.apache.drill.exec.record.metadata.SchemaContainer parent, String name) Add a map column.addMapArray(org.apache.drill.exec.record.metadata.SchemaContainer parent, String name) voidaddNullable(String name, TypeProtos.MinorType type) voidaddNullable(String name, TypeProtos.MinorType type, int width) addRepeatedList(org.apache.drill.exec.record.metadata.SchemaContainer parent, String name) schema()
-
Constructor Details
-
TupleBuilder
public TupleBuilder()
-
-
Method Details
-
addColumn
-
add
-
add
-
add
-
add
-
add
-
addNullable
-
addNullable
-
addArray
-
addDecimal
public void addDecimal(String name, TypeProtos.MinorType type, TypeProtos.DataMode mode, int precision, int scale) -
addArray
Add a multi-dimensional array, implemented as a repeated vector along with 0 or more repeated list vectors.- Parameters:
name- column nametype- base data typedims- number of dimensions, 1 or more
-
addMap
Add a map column. The returned schema builder is for the nested map. Building that map, usingMapBuilder.resumeSchema(), will return the original schema builder.- Parameters:
parent- schema containername- the name of the map column- Returns:
- a builder for the map
-
addMapArray
public MapBuilder addMapArray(org.apache.drill.exec.record.metadata.SchemaContainer parent, String name) -
addDict
public DictBuilder addDict(org.apache.drill.exec.record.metadata.SchemaContainer parent, String name) -
addDictArray
public DictBuilder addDictArray(org.apache.drill.exec.record.metadata.SchemaContainer parent, String name) -
addUnion
public UnionBuilder addUnion(org.apache.drill.exec.record.metadata.SchemaContainer parent, String name) -
addList
public UnionBuilder addList(org.apache.drill.exec.record.metadata.SchemaContainer parent, String name) -
addRepeatedList
public RepeatedListBuilder addRepeatedList(org.apache.drill.exec.record.metadata.SchemaContainer parent, String name) -
schema
-