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

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression
      extended by org.apache.hadoop.hive.ql.exec.vector.expressions.MathFuncLongToLong
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PosModLongToLong

public abstract class MathFuncLongToLong
extends VectorExpression

Implement vectorized math function that takes a long (and optionally additional constant argument(s)) and returns long. Use this for PMOD() etc. Do NOT use this for simple math functions like sin/cos/exp etc. that just take a single argument. For those, modify the template ColumnUnaryFunc.txt and expand the template to generate needed classes.

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
MathFuncLongToLong()
           
MathFuncLongToLong(int colNum, int outputColumn)
           
 
Method Summary
 void evaluate(VectorizedRowBatch batch)
          This is the primary method to implement expression logic.
 int getColNum()
           
 int getOutputColumn()
          Returns the index of the output column in the array of column vectors.
 String getOutputType()
          Returns type of the output column.
 void setColNum(int colNum)
           
 void setOutputColumn(int outputColumn)
           
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression
getChildExpressions, getDescriptor, getInputTypes, setChildExpressions, setInputTypes, setOutputType, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MathFuncLongToLong

public MathFuncLongToLong(int colNum,
                          int outputColumn)

MathFuncLongToLong

public MathFuncLongToLong()
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

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 outputColumn)

getColNum

public int getColNum()

setColNum

public void setColNum(int colNum)

getOutputType

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

Overrides:
getOutputType in class VectorExpression


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