Class ConstrainedFieldOutput

java.lang.Object
org.apache.drill.exec.store.easy.text.reader.BaseFieldOutput
org.apache.drill.exec.store.easy.text.reader.ConstrainedFieldOutput

public class ConstrainedFieldOutput extends BaseFieldOutput
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 Details

    • colWriters

      protected final ValueWriter[] 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 class BaseFieldOutput
    • endField

      public boolean endField()
      Overrides:
      endField in class BaseFieldOutput
    • columnWriter

      protected ValueWriter columnWriter()
      Specified by:
      columnWriter in class BaseFieldOutput