public interface TupleModel
The terminology used here:
MaterializedField
,
but also adds allocation hints.
This abstraction is the physical dual of a VectorContainer
.
The vectors are "owned" by
the associated container. The structure here simply applies additional
metadata and visitor behavior to allow much easier processing that is
possible with the raw container structure.
A key value of this abstraction is the extended TupleSchema
associated with the structure. Unlike a
VectorContainer
, this abstraction keeps the schema in sync
with vectors as columns are added.
Some future version may wish to merge the two concepts. That way, metadata discovered by one operator will be available to another. Complex recursive functions can be replace by a visitor with the recursion handled inside implementations of this interface.
Tuples provide access to columns by both index and name. Both the schema and
model classes follow this convention. Compared with the VectorContainer and
AbstractMapVector
classes, the vector index is a first-class concept:
the column model and schema are guaranteed to reside at the same index relative
to the enclosing tuple. In addition, name access is efficient using a hash
index.
Visitor classes are defined by the "simple" (single batch) and "hyper" (multi-batch) implementations to allow vector implementations to work with the specifics of each type of batch.
Modifier and Type | Interface and Description |
---|---|
static interface |
TupleModel.ColumnModel
Common interface to access a column vector, its metadata, and its
tuple definition (for maps.) Provides a visitor interface for common
vector tasks.
|
static interface |
TupleModel.RowSetModel
Tuple-model interface for the top-level row (tuple) structure.
|
Modifier and Type | Method and Description |
---|---|
TupleModel.ColumnModel |
column(int index) |
TupleModel.ColumnModel |
column(String name) |
TupleMetadata |
schema() |
int |
size() |
TupleMetadata schema()
int size()
TupleModel.ColumnModel column(int index)
TupleModel.ColumnModel column(String name)
Copyright © 1970 The Apache Software Foundation. All rights reserved.