Interface OrcFilterContext

All Superinterfaces:
org.apache.hadoop.hive.ql.io.filter.FilterContext, org.apache.hadoop.hive.ql.io.filter.MutableFilterContext
All Known Implementing Classes:
OrcFilterContextImpl

public interface OrcFilterContext extends org.apache.hadoop.hive.ql.io.filter.MutableFilterContext
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.

  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.hive.ql.exec.vector.ColumnVector[]
    Retrieves the column vector that matches the specified name.
    static boolean
    isNull(org.apache.hadoop.hive.ql.exec.vector.ColumnVector[] vectorBranch, int idx)
    Utility method for determining if a particular row element in the vector branch is null.
    static boolean
    noNulls(org.apache.hadoop.hive.ql.exec.vector.ColumnVector[] vectorBranch)
    Utility method for determining if the leaf vector of the branch can be treated as having noNulls.

    Methods inherited from interface org.apache.hadoop.hive.ql.io.filter.FilterContext

    getSelected, getSelectedSize, isSelectedInUse, reset

    Methods inherited from interface org.apache.hadoop.hive.ql.io.filter.MutableFilterContext

    immutable, setFilterContext, setSelected, setSelectedInUse, setSelectedSize, updateSelected, validateSelected
  • Method Details

    • findColumnVector

      org.apache.hadoop.hive.ql.exec.vector.ColumnVector[] findColumnVector(String name)
      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.
      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
      Throws:
      IllegalArgumentException - if the field is not found or if the nested field is not part of a struct
    • noNulls

      static boolean noNulls(org.apache.hadoop.hive.ql.exec.vector.ColumnVector[] vectorBranch)
      Utility method for determining if the leaf vector of the branch can be treated as having noNulls. This method navigates from the top to the leaf and checks if we have nulls anywhere in the branch as compared to checking just the leaf vector.
      Parameters:
      vectorBranch - The input vector branch from the root to the leaf
      Returns:
      true if the entire branch satisfies noNull else false
    • isNull

      static boolean isNull(org.apache.hadoop.hive.ql.exec.vector.ColumnVector[] vectorBranch, int idx) throws IllegalArgumentException
      Utility method for determining if a particular row element in the vector branch is null. This method navigates from the top to the leaf and checks if we have nulls anywhere in the branch as compared to checking just the leaf vector.
      Parameters:
      vectorBranch - The input vector branch from the root to the leaf
      idx - The row index being tested
      Returns:
      true if the entire branch is not null for the idx otherwise false
      Throws:
      IllegalArgumentException - If a multivalued vector such as List or Map is encountered in the branch.