Class ConstrainedFieldOutput
java.lang.Object
org.apache.drill.exec.store.easy.text.reader.BaseFieldOutput
org.apache.drill.exec.store.easy.text.reader.ConstrainedFieldOutput
For CSV files without headers, but with a provided schema,
handles the case where extra fields appear in the file beyond
the columns enumerated in the schema. These fields are ignored.
-
Field Summary
Fields inherited from class org.apache.drill.exec.store.easy.text.reader.BaseFieldOutput
currentDataPointer, currentFieldIndex, fieldBytes, fieldProjected, fieldWriteCount, maxField, writer
-
Method Summary
Modifier and TypeMethodDescriptionprotected ValueWriter
boolean
endField()
protected void
Write a buffer of data to the underlying vector using the column writer.Methods inherited from class org.apache.drill.exec.store.easy.text.reader.BaseFieldOutput
append, endEmptyField, finishRecord, getRecordCount, isFull, startField, startRecord
-
Field Details
-
colWriters
-
-
Method Details
-
writeToVector
protected void writeToVector()Description copied from class:BaseFieldOutput
Write a buffer of data to the underlying vector using the column writer. The buffer holds a complete or partial chunk of data for the field. If this is the first data for the field, write the bytes. If this is a second buffer for the same field, append the bytes. The append will work if the underlying vector is VarChar, it will fail if a type conversion shim is in between. (This is generally OK because the previous setBytes should have failed because a large int or date is not supported.)- Overrides:
writeToVector
in classBaseFieldOutput
-
endField
public boolean endField()- Overrides:
endField
in classBaseFieldOutput
-
columnWriter
- Specified by:
columnWriter
in classBaseFieldOutput
-