public abstract class BaseFieldOutput extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
currentDataPointer |
protected int |
currentFieldIndex |
protected byte[] |
fieldBytes |
protected boolean |
fieldProjected |
protected int |
fieldWriteCount |
protected int |
maxField |
protected RowSetLoader |
writer |
| Constructor and Description |
|---|
BaseFieldOutput(RowSetLoader writer,
int maxField,
boolean[] projectionMask)
Initialize the field output for one of three scenarios:
SELECT all: SELECT *, SELECT columns.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(byte data)
Appends a byte to the output character data buffer.
|
protected abstract ValueWriter |
columnWriter() |
boolean |
endEmptyField()
Shortcut that lets the output know that we are closing ending a field with no data.
|
boolean |
endField()
End processing a field within a record.
|
void |
finishRecord()
Completes the processing of a given record.
|
long |
getRecordCount()
Return the total number of records (across batches) processed
|
boolean |
isFull()
Indicates if the current batch is full and reading for this batch
should stop.
|
void |
startField(int index)
Start processing a new field within a record.
|
void |
startRecord()
Start a new record record.
|
protected void |
writeToVector()
Write a buffer of data to the underlying vector using the
column writer.
|
protected int currentFieldIndex
protected int currentDataPointer
protected int fieldWriteCount
protected byte[] fieldBytes
protected final RowSetLoader writer
protected final int maxField
protected boolean fieldProjected
public BaseFieldOutput(RowSetLoader writer, int maxField, boolean[] projectionMask)
writer - Row set writer that provides access to the writer for
each columnmaxField - the index of the last field to store. May be -1 if no
fields are to be stored. Computed if the projection mask is setprojectionMask - a boolean array indicating which fields are
to be projected to the output. Optionalpublic void startRecord()
public void startField(int index)
index - index within the recordpublic void append(byte data)
data - current byte readprotected void writeToVector()
protected abstract ValueWriter columnWriter()
public boolean endField()
public boolean endEmptyField()
public void finishRecord()
public long getRecordCount()
public boolean isFull()
Copyright © 2021 The Apache Software Foundation. All rights reserved.