Package org.apache.orc.impl
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
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hive.ql.exec.vector.ColumnVector[]
findColumnVector
(String name) Retrieves the column vector that matches the specified name.org.apache.hadoop.hive.ql.exec.vector.ColumnVector[]
getCols()
int[]
int
boolean
void
reset()
setBatch
(@NotNull org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch) void
setFilterContext
(boolean selectedInUse, int[] selected, int selectedSize) void
setSelected
(int[] ints) void
setSelectedInUse
(boolean b) void
setSelectedSize
(int i) int[]
updateSelected
(int i) boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hive.ql.io.filter.MutableFilterContext
immutable
-
Constructor Details
-
OrcFilterContextImpl
-
-
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 interfaceorg.apache.hadoop.hive.ql.io.filter.MutableFilterContext
-
validateSelected
public boolean validateSelected()- Specified by:
validateSelected
in interfaceorg.apache.hadoop.hive.ql.io.filter.MutableFilterContext
-
updateSelected
public int[] updateSelected(int i) - Specified by:
updateSelected
in interfaceorg.apache.hadoop.hive.ql.io.filter.MutableFilterContext
-
setSelectedInUse
public void setSelectedInUse(boolean b) - Specified by:
setSelectedInUse
in interfaceorg.apache.hadoop.hive.ql.io.filter.MutableFilterContext
-
setSelected
public void setSelected(int[] ints) - Specified by:
setSelected
in interfaceorg.apache.hadoop.hive.ql.io.filter.MutableFilterContext
-
setSelectedSize
public void setSelectedSize(int i) - Specified by:
setSelectedSize
in interfaceorg.apache.hadoop.hive.ql.io.filter.MutableFilterContext
-
reset
public void reset()- Specified by:
reset
in interfaceorg.apache.hadoop.hive.ql.io.filter.FilterContext
-
isSelectedInUse
public boolean isSelectedInUse()- Specified by:
isSelectedInUse
in interfaceorg.apache.hadoop.hive.ql.io.filter.FilterContext
-
getSelected
public int[] getSelected()- Specified by:
getSelected
in interfaceorg.apache.hadoop.hive.ql.io.filter.FilterContext
-
getSelectedSize
public int getSelectedSize()- Specified by:
getSelectedSize
in interfaceorg.apache.hadoop.hive.ql.io.filter.FilterContext
-
getCols
public org.apache.hadoop.hive.ql.exec.vector.ColumnVector[] getCols() -
findColumnVector
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 interfaceOrcFilterContext
- 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
-