Interface PushResultSetReader
- All Known Implementing Classes:
PushResultSetReaderImpl
public interface PushResultSetReader
Push-based result set reader, in which the caller obtains batches
and registers them with the implementation. The client thus is responsible
for detecting the end of batches and releasing memory. General protocol:
- Create an instance and bind it to a batch source.
- Obtain a batch, typically by having it passed in.
- Call
start()
to obtain a reader for that batch. - Iterate over the rows.
- Release memory for the batch.
In Drill,
batches may have the same or different schemas. Each call to
start()
prepares a RowSetReader
to use for
the available batch. If the batch has the same schema as the previous,
then the existing reader is simply repositioned at the start of the
batch. If the schema changed (or this is the first batch), then a
new reader is created. Thus, the client should not assume that the
same reader is available across calls. However, if it is useful to
cache column writers, simply check if the reader returned from
start()
is the same as the previous one. If so, the column
writers are also the same.
-
Method Summary
-
Method Details
-
start
RowSetReader start()
-