Class FilteredColumnarBatch

Object
io.delta.kernel.data.FilteredColumnarBatch

@Evolving public class FilteredColumnarBatch extends Object
Represents a filtered version of ColumnarBatch. Contains original ColumnarBatch with an optional selection vector to select only a subset of rows for the original columnar batch.

The selection vector is of type boolean and has the same size as the data in the corresponding ColumnarBatch. For each row index, a value of true in the selection vector indicates the row at the same index in the data ColumnarBatch is valid; a value of false indicates the row should be ignored. If there is no selection vector then all the rows are valid.

Since:
3.0.0
  • Constructor Details

  • Method Details

    • getData

      public ColumnarBatch getData()
      Return the data as ColumnarBatch. Not all rows in the data are valid for this result. An optional selectionVector determines which rows are selected. If there is no selection vector that means all rows in this columnar batch are valid for this result.
      Returns:
      all the data read from the file
    • getSelectionVector

      public Optional<ColumnVector> getSelectionVector()
      Optional selection vector containing one entry for each row in data indicating whether a row is selected or not selected. If there is no selection vector then all the rows are valid.
      Returns:
      an optional ColumnVector indicating which rows are valid
    • getRows

      public CloseableIterator<Row> getRows()
      Iterator of rows that survived the filter.
      Returns:
      Closeable iterator of rows that survived the filter. It is responsibility of the caller to the close the iterator.