org.apache.hadoop.hive.ql.exec.vector.expressions
Class StringColumnInList

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression
      extended by org.apache.hadoop.hive.ql.exec.vector.expressions.StringColumnInList
All Implemented Interfaces:
Serializable, IStringInExpr

public class StringColumnInList
extends VectorExpression
implements IStringInExpr

Evaluate an IN boolean expression (not a filter) on a batch for a vector of strings. This is optimized so that no objects have to be created in the inner loop, and there is a hash table implemented with Cuckoo hashing that has fast lookup to do the IN test.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression
VectorExpression.Type
 
Constructor Summary
StringColumnInList()
           
StringColumnInList(int colNum, int outputColumn)
          After construction you must call setInListValues() to add the values to the IN set.
 
Method Summary
 void evaluate(VectorizedRowBatch batch)
          This is the primary method to implement expression logic.
 VectorExpressionDescriptor.Descriptor getDescriptor()
           
 byte[][] getInListValues()
           
 int getInputCol()
           
 int getOutputColumn()
          Returns the index of the output column in the array of column vectors.
 String getOutputType()
          Returns type of the output column.
 void setInListValues(byte[][] a)
           
 void setInputCol(int colNum)
           
 void setOutputColumn(int value)
           
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression
getChildExpressions, getInputTypes, setChildExpressions, setInputTypes, setOutputType, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringColumnInList

public StringColumnInList()

StringColumnInList

public StringColumnInList(int colNum,
                          int outputColumn)
After construction you must call setInListValues() to add the values to the IN set.

Method Detail

evaluate

public void evaluate(VectorizedRowBatch batch)
Description copied from class: VectorExpression
This is the primary method to implement expression logic.

Specified by:
evaluate in class VectorExpression

getOutputType

public String getOutputType()
Description copied from class: VectorExpression
Returns type of the output column.

Overrides:
getOutputType in class VectorExpression

getOutputColumn

public int getOutputColumn()
Description copied from class: VectorExpression
Returns the index of the output column in the array of column vectors. If not applicable, -1 is returned.

Specified by:
getOutputColumn in class VectorExpression
Returns:
Index of the output column

setOutputColumn

public void setOutputColumn(int value)

getInputCol

public int getInputCol()

setInputCol

public void setInputCol(int colNum)

getDescriptor

public VectorExpressionDescriptor.Descriptor getDescriptor()
Specified by:
getDescriptor in class VectorExpression

getInListValues

public byte[][] getInListValues()

setInListValues

public void setInListValues(byte[][] a)
Specified by:
setInListValues in interface IStringInExpr


Copyright © 2014 The Apache Software Foundation. All rights reserved.