Class RepeatedVarCharOutput
java.lang.Object
org.apache.drill.exec.store.easy.text.reader.BaseFieldOutput
org.apache.drill.exec.store.easy.text.reader.RepeatedVarCharOutput
Class is responsible for generating record batches for text file inputs. We generate
a record batch with a single vector of type repeated varchar vector. Each record is a single
value within the vector containing all the fields in the record as individual array elements.
-
Field Summary
Fields inherited from class org.apache.drill.exec.store.easy.text.reader.BaseFieldOutput
currentDataPointer, currentFieldIndex, fieldBytes, fieldProjected, fieldWriteCount, maxField, writer
-
Constructor Summary
ConstructorDescriptionRepeatedVarCharOutput
(RowSetLoader loader, boolean[] projectionMask) Provide the row set loader (which must have just one repeated Varchar column) and an optional array projection mask. -
Method Summary
Modifier and TypeMethodDescriptionprotected ScalarWriter
boolean
endField()
Write the value into an array position.Methods inherited from class org.apache.drill.exec.store.easy.text.reader.BaseFieldOutput
append, endEmptyField, finishRecord, getRecordCount, isFull, startField, startRecord, writeToVector
-
Constructor Details
-
RepeatedVarCharOutput
Provide the row set loader (which must have just one repeated Varchar column) and an optional array projection mask.- Parameters:
loader
- row set loaderprojectionMask
- array projection mask
-
-
Method Details
-
endField
public boolean endField()Write the value into an array position. Rules:- If there is no projection mask, collect all columns.
- If a selection mask is present, we previously found the index of the last projection column (maxField). If the current column is beyond that number, ignore the data and stop accepting columns.
- If the column is projected, add the data to the array.
- If the column is not projected, add a blank value to the array.
- Overrides:
endField
in classBaseFieldOutput
-
columnWriter
- Specified by:
columnWriter
in classBaseFieldOutput
-