Class PullResultSetReaderImpl
java.lang.Object
org.apache.drill.exec.physical.resultSet.impl.PullResultSetReaderImpl
- All Implemented Interfaces:
PullResultSetReader
Protocol
- Create an instance, passing in a
PullResultSetReaderImpl.UpstreamSource
to provide batches and optional selection vector. - For each incoming batch:
- Call
#start()
to attach the batch. The associatedBatchAccessor
reports if the schema has changed. - Call
reader()
to obtain a reader. - Iterate over the batch using the reader.
- Call
#release()
to free the memory for the incoming batch. Or, to call#detach()
to keep the batch memory.
- Call
- Call
close()
after all batches are read.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static enum
static interface
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
PullResultSetReaderImpl
-
-
Method Details
-
schema
Description copied from interface:PullResultSetReader
Return the schema for this result set.- Specified by:
schema
in interfacePullResultSetReader
-
next
public boolean next()Description copied from interface:PullResultSetReader
Advance to the next batch of data. The iterator starts positioned before the first batch (but after obtaining a schema.)- Specified by:
next
in interfacePullResultSetReader
- Returns:
true
if another batch is available,false
if EOF
-
schemaVersion
public int schemaVersion()- Specified by:
schemaVersion
in interfacePullResultSetReader
-
reader
Description copied from interface:PullResultSetReader
Obtain a reader to iterate over the rows of the batch. The return value will likely be the same reader each time, so that this call is optional after the first batch.- Specified by:
reader
in interfacePullResultSetReader
-
close
public void close()Description copied from interface:PullResultSetReader
Close this reader. Releases any memory still assigned to any attached batch. Call#detach()
first if you want to preserve the batch memory.- Specified by:
close
in interfacePullResultSetReader
-
state
-