public class SimpleReaderBuilder extends ReaderBuilder
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.
Modifier and Type | Method and Description |
---|---|
static RowSetReaderImpl |
build(BatchAccessor batch) |
static RowSetReaderImpl |
build(VectorContainer container,
ReaderIndex rowIndex) |
static RowSetReaderImpl |
build(VectorContainer container,
TupleMetadata schema,
ReaderIndex rowIndex) |
List<AbstractObjectReader> |
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) |
buildReader, buildScalarReader
public static RowSetReaderImpl build(VectorContainer container, TupleMetadata schema, ReaderIndex rowIndex)
public static RowSetReaderImpl build(VectorContainer container, ReaderIndex rowIndex)
public static RowSetReaderImpl build(BatchAccessor batch)
public static ReaderIndex readerIndex(BatchAccessor batch)
public List<AbstractObjectReader> buildContainerChildren(VectorContainer container, MetadataProvider mdProvider)
protected AbstractObjectReader buildVectorReader(ValueVector vector, MetadataProvider.VectorDescrip descrip)
protected List<AbstractObjectReader> buildMapMembers(AbstractMapVector mapVector, MetadataProvider provider)
Copyright © 1970 The Apache Software Foundation. All rights reserved.