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

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AbstractFilterStringColLikeStringScalar, CastDecimalToDecimal, CastLongToDate, CastStringToDate, CastStringToDecimal, ColAndCol, ColOrCol, ConstantVectorExpression, DecimalColumnInList, DecimalToStringUnaryUDF, DoubleColumnInList, FilterColAndScalar, FilterColOrScalar, FilterDecimalColumnInList, FilterDoubleColumnInList, FilterExprAndExpr, FilterExprOrExpr, FilterLongColumnInList, FilterScalarAndColumn, FilterScalarOrColumn, FilterStringColumnInList, FuncDecimalToDouble, FuncDecimalToLong, FuncDoubleToDecimal, FuncLongToDecimal, FuncLongToString, FuncRand, FuncRandNoSeed, FuncRoundWithNumDigitsDecimalToDecimal, IdentityExpression, IfExprStringColumnStringColumn, IfExprStringColumnStringScalar, IfExprStringScalarStringColumn, IfExprStringScalarStringScalar, IsNotNull, IsNull, LongColDivideLongColumn, LongColDivideLongScalar, LongColumnInList, LongScalarDivideLongColumn, LongToStringUnaryUDF, MathFuncDoubleToDouble, MathFuncLongToDouble, MathFuncLongToLong, NotCol, SelectColumnIsFalse, SelectColumnIsNotNull, SelectColumnIsNull, SelectColumnIsTrue, StringColumnInList, StringConcatColCol, StringConcatColScalar, StringConcatScalarCol, StringLength, StringSubstrColStart, StringSubstrColStartLen, StringUnaryUDF, StringUnaryUDFDirect, VectorCoalesce, VectorUDFAdaptor, VectorUDFDateAddColCol, VectorUDFDateAddColScalar, VectorUDFDateAddScalarCol, VectorUDFDateDiffColCol, VectorUDFDateDiffColScalar, VectorUDFDateDiffScalarCol, VectorUDFTimestampFieldLong, VectorUDFTimestampFieldString

public abstract class VectorExpression
extends Object
implements Serializable

Base class for expressions.

See Also:
Serialized Form

Nested Class Summary
static class VectorExpression.Type
           
 
Constructor Summary
VectorExpression()
           
 
Method Summary
abstract  void evaluate(VectorizedRowBatch batch)
          This is the primary method to implement expression logic.
 VectorExpression[] getChildExpressions()
           
abstract  VectorExpressionDescriptor.Descriptor getDescriptor()
           
 VectorExpression.Type[] getInputTypes()
           
abstract  int getOutputColumn()
          Returns the index of the output column in the array of column vectors.
 String getOutputType()
          Returns type of the output column.
 void setChildExpressions(VectorExpression[] ve)
          Initialize the child expressions.
 void setInputTypes(VectorExpression.Type... inputTypes)
          Set more detailed types to distinguish certain types that is represented in same VectorExpressionDescriptor.ArgumentTypes.
 void setOutputType(String type)
          Set type of the output column.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VectorExpression

public VectorExpression()
Method Detail

evaluate

public abstract void evaluate(VectorizedRowBatch batch)
This is the primary method to implement expression logic.

Parameters:
batch -

getOutputColumn

public abstract int getOutputColumn()
Returns the index of the output column in the array of column vectors. If not applicable, -1 is returned.

Returns:
Index of the output column

getOutputType

public String getOutputType()
Returns type of the output column.


setOutputType

public void setOutputType(String type)
Set type of the output column.


setChildExpressions

public void setChildExpressions(VectorExpression[] ve)
Initialize the child expressions.


getChildExpressions

public VectorExpression[] getChildExpressions()

getDescriptor

public abstract VectorExpressionDescriptor.Descriptor getDescriptor()

setInputTypes

public void setInputTypes(VectorExpression.Type... inputTypes)
Set more detailed types to distinguish certain types that is represented in same VectorExpressionDescriptor.ArgumentTypes. For example, date and timestamp will be in LongColumnVector but they need to be distinguished.

Parameters:
inputTypes -

getInputTypes

public VectorExpression.Type[] getInputTypes()

toString

public String toString()
Overrides:
toString in class Object


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