Class StaticBatchBuilder

java.lang.Object
org.apache.drill.exec.physical.impl.scan.v3.lifecycle.StaticBatchBuilder
Direct Known Subclasses:
StaticBatchBuilder.NullBatchBuilder, StaticBatchBuilder.RepeatedBatchBuilder

public abstract class StaticBatchBuilder extends Object
Base class for columns that take values based on the reader, not individual rows. E.g. null columns (values are all null) or implicit file columns that take values based on the file.

If a column needs a default value, that value can be set either via the values vector or as a column property on the column schema. The result set loader uses the default value to fill empty values. Otherwise, the column is assumed to be nullable and is filled with nulls.

  • Field Details

  • Constructor Details

  • Method Details

    • schema

      public TupleMetadata schema()
    • load

      public VectorContainer load(int rowCount)
      Populate static vectors with the defined static values.
      Parameters:
      rowCount - number of rows to generate. Must match the row count in the batch returned by the reader
    • loadBatch

      protected abstract void loadBatch(int rowCount)
    • close

      public void close()
    • outputContainer

      public VectorContainer outputContainer()