Class OrcFilterContextImpl

java.lang.Object
org.apache.orc.impl.OrcFilterContextImpl
All Implemented Interfaces:
org.apache.hadoop.hive.ql.io.filter.FilterContext, org.apache.hadoop.hive.ql.io.filter.MutableFilterContext, OrcFilterContext

public class OrcFilterContextImpl extends Object implements OrcFilterContext
This defines the input for any filter operation. This is an extension of [[VectorizedRowBatch]] with schema.

This offers a convenience method of finding the column vector from a given column name that the filters can invoke to get access to the column vector.

  • Constructor Details

    • OrcFilterContextImpl

      public OrcFilterContextImpl(TypeDescription readSchema, boolean isSchemaCaseAware)
  • Method Details

    • setBatch

      public OrcFilterContext setBatch(@NotNull @NotNull org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch)
    • setFilterContext

      public void setFilterContext(boolean selectedInUse, int[] selected, int selectedSize)
      Specified by:
      setFilterContext in interface org.apache.hadoop.hive.ql.io.filter.MutableFilterContext
    • validateSelected

      public boolean validateSelected()
      Specified by:
      validateSelected in interface org.apache.hadoop.hive.ql.io.filter.MutableFilterContext
    • updateSelected

      public int[] updateSelected(int i)
      Specified by:
      updateSelected in interface org.apache.hadoop.hive.ql.io.filter.MutableFilterContext
    • setSelectedInUse

      public void setSelectedInUse(boolean b)
      Specified by:
      setSelectedInUse in interface org.apache.hadoop.hive.ql.io.filter.MutableFilterContext
    • setSelected

      public void setSelected(int[] ints)
      Specified by:
      setSelected in interface org.apache.hadoop.hive.ql.io.filter.MutableFilterContext
    • setSelectedSize

      public void setSelectedSize(int i)
      Specified by:
      setSelectedSize in interface org.apache.hadoop.hive.ql.io.filter.MutableFilterContext
    • reset

      public void reset()
      Specified by:
      reset in interface org.apache.hadoop.hive.ql.io.filter.FilterContext
    • isSelectedInUse

      public boolean isSelectedInUse()
      Specified by:
      isSelectedInUse in interface org.apache.hadoop.hive.ql.io.filter.FilterContext
    • getSelected

      public int[] getSelected()
      Specified by:
      getSelected in interface org.apache.hadoop.hive.ql.io.filter.FilterContext
    • getSelectedSize

      public int getSelectedSize()
      Specified by:
      getSelectedSize in interface org.apache.hadoop.hive.ql.io.filter.FilterContext
    • getCols

      public org.apache.hadoop.hive.ql.exec.vector.ColumnVector[] getCols()
    • findColumnVector

      public org.apache.hadoop.hive.ql.exec.vector.ColumnVector[] findColumnVector(String name)
      Description copied from interface: OrcFilterContext
      Retrieves the column vector that matches the specified name. Allows support for nested struct references e.g. order.date where date is a field in a struct called order.
      Specified by:
      findColumnVector in interface OrcFilterContext
      Parameters:
      name - The column name whose vector should be retrieved
      Returns:
      The column vectors from the root to the column name. The array levels match the name levels with Array[0] referring to the top level, followed by the subsequent levels. For example of order.date Array[0] refers to order and Array[1] refers to date