public interface PullResultSetReader
#start() to attach the batch. The associated
BatchAccessor reports if the schema has changed.reader() to obtain a reader.#release() to free the memory for the
incoming batch. Or, to call #detach() to keep
the batch memory.close() after all batches are read.schema(), if desired, to obtain the schema
for this result set.next() to advance to the first batch.next() returns true, then call
reader() to obtain a reader over rows. This reader also
provides the batch schema.next() to advance to the next batch and
repeat.The implementation may perform complex tasks behind the scenes: coordinate with the query runner (if remote), drive an operator (if within a DAG), etc. The implementation takes an interface that interfaces with the source of batches.
Designed to handle batches arriving from a single upstream operator. Uses Drill's strict form of schema identity: that not only must the column definitions match; the vectors must be identical from one batch to the next. If the vectors differ, then this class assumes a new schema has occurred, and will rebuild all the underlying readers, which can be costly.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this reader.
|
boolean |
next()
Advance to the next batch of data.
|
RowSetReader |
reader()
Obtain a reader to iterate over the rows of the batch.
|
TupleMetadata |
schema()
Return the schema for this result set.
|
int |
schemaVersion() |
boolean next()
true if another batch is available,
false if EOFTupleMetadata schema()
int schemaVersion()
RowSetReader reader()
void close()
#detach() first if
you want to preserve the batch memory.Copyright © 2021 The Apache Software Foundation. All rights reserved.