public class ResultSetCopierImpl extends Object implements ResultSetCopier
Modifier and Type | Field and Description |
---|---|
protected RowSetReader |
rowReader |
Constructor and Description |
---|
ResultSetCopierImpl(BufferAllocator allocator,
PullResultSetReader source) |
ResultSetCopierImpl(BufferAllocator allocator,
PullResultSetReader source,
ResultSetOptionBuilder outputOptions) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Release resources, including any pending input batch
and any non-harvested output batch.
|
void |
copyAllRows()
Copy all (remaining) input rows to the output.
|
boolean |
copyNextRow()
If copying rows one by one, copy the next row from the
input.
|
void |
copyRow(int posn)
Copy a row at the given position.
|
VectorContainer |
harvest()
Obtain the output batch.
|
boolean |
hasOutputRows()
Reports if the output batch has rows.
|
boolean |
isCopyPending()
Helper method to determine if a copy is pending: more rows
remain to be copied.
|
boolean |
isOutputFull()
Reports if the output batch is full and must be sent
downstream.
|
boolean |
nextInputBatch()
Start the next input batch.
|
void |
startOutputBatch()
Start the next output batch.
|
protected void |
verifyWritable() |
protected RowSetReader rowReader
public ResultSetCopierImpl(BufferAllocator allocator, PullResultSetReader source)
public ResultSetCopierImpl(BufferAllocator allocator, PullResultSetReader source, ResultSetOptionBuilder outputOptions)
public void startOutputBatch()
ResultSetCopier
startOutputBatch
in interface ResultSetCopier
public boolean nextInputBatch()
ResultSetCopier
ResultSetReader
passed into the constructor.nextInputBatch
in interface ResultSetCopier
public boolean hasOutputRows()
ResultSetCopier
hasOutputRows
in interface ResultSetCopier
public boolean isOutputFull()
ResultSetCopier
ResultSetCopier.isCopyPending()
will
also return true.
This function also returns true if a schema change occurred on the latest input row, in which case the partially-completed batch of the old schema must be flushed downstream.
isOutputFull
in interface ResultSetCopier
protected void verifyWritable()
public boolean copyNextRow()
ResultSetCopier
copyNextRow
in interface ResultSetCopier
public void copyRow(int posn)
ResultSetCopier
copyRow
in interface ResultSetCopier
posn
- the input row position. If a selection vector
is attached, then this is the selection vector positionpublic void copyAllRows()
ResultSetCopier
ResultSetCopier.isCopyPending()
will return true.copyAllRows
in interface ResultSetCopier
public boolean isCopyPending()
ResultSetCopier
isCopyPending
in interface ResultSetCopier
public VectorContainer harvest()
ResultSetCopier
harvest
in interface ResultSetCopier
public void close()
ResultSetCopier
close
in interface ResultSetCopier
Copyright © 1970 The Apache Software Foundation. All rights reserved.