Class SimpleReaderBuilder
java.lang.Object
org.apache.drill.exec.physical.resultSet.model.ReaderBuilder
org.apache.drill.exec.physical.resultSet.model.single.SimpleReaderBuilder
Builds a set of readers for a single (non-hyper) batch. Single batches
are indexed directly or via a simple indirection vector.
Derived classes handle the details of the various kinds of readers.
Today there is a single subclass that builds (test-time)
RowSet
objects.
The idea, however, is that we may eventually
want to create a "result set reader" for use in internal operators,
in parallel to the "result set loader". The result set reader would
handle a stream of incoming batches. The extant RowSet class handles
just one batch (the batch that is returned from a test.)
Readers are built recursively by walking the tree that defines a row's structure. For a classic relational tuple, the tree has just a root and a set of primitives. But, once we add array (repeated), variant (LIST, UNION) and tuple (MAP) columns, the tree grows quite complex.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RowSetReaderImpl
build
(BatchAccessor batch) static RowSetReaderImpl
build
(VectorContainer container, ReaderIndex rowIndex) static RowSetReaderImpl
build
(VectorContainer container, TupleMetadata schema, ReaderIndex rowIndex) buildContainerChildren
(VectorContainer container, MetadataProvider mdProvider) protected List<AbstractObjectReader>
buildMapMembers
(AbstractMapVector mapVector, MetadataProvider provider) protected AbstractObjectReader
buildVectorReader
(ValueVector vector, MetadataProvider.VectorDescrip descrip) static ReaderIndex
readerIndex
(BatchAccessor batch) Methods inherited from class org.apache.drill.exec.physical.resultSet.model.ReaderBuilder
buildReader, buildScalarReader
-
Method Details
-
build
public static RowSetReaderImpl build(VectorContainer container, TupleMetadata schema, ReaderIndex rowIndex) -
build
-
build
-
readerIndex
-
buildContainerChildren
public List<AbstractObjectReader> buildContainerChildren(VectorContainer container, MetadataProvider mdProvider) -
buildVectorReader
protected AbstractObjectReader buildVectorReader(ValueVector vector, MetadataProvider.VectorDescrip descrip) -
buildMapMembers
protected List<AbstractObjectReader> buildMapMembers(AbstractMapVector mapVector, MetadataProvider provider)
-