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.UpstreamSourceto provide batches and optional selection vector. - For each incoming batch:
- Call
to attach the batch. The associated
invalid reference
#start()BatchAccessorreports if the schema has changed. - Call
reader()to obtain a reader. - Iterate over the batch using the reader.
- Call
to free the memory for the incoming batch. Or, to call
invalid reference
#release()to keep the batch memory.invalid reference
#detach()
- Call
- Call
close()after all batches are read.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumstatic interface -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PullResultSetReaderImpl
-
-
Method Details
-
schema
Description copied from interface:PullResultSetReaderReturn the schema for this result set.- Specified by:
schemain interfacePullResultSetReader
-
next
public boolean next()Description copied from interface:PullResultSetReaderAdvance to the next batch of data. The iterator starts positioned before the first batch (but after obtaining a schema.)- Specified by:
nextin interfacePullResultSetReader- Returns:
trueif another batch is available,falseif EOF
-
schemaVersion
public int schemaVersion()- Specified by:
schemaVersionin interfacePullResultSetReader
-
reader
Description copied from interface:PullResultSetReaderObtain 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:
readerin interfacePullResultSetReader
-
close
public void close()Description copied from interface:PullResultSetReaderClose this reader. Releases any memory still assigned to any attached batch. Callfirst if you want to preserve the batch memory.invalid reference
#detach()- Specified by:
closein interfacePullResultSetReader
-
state
-