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

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

public class ConstantVectorExpression
extends VectorExpression

Constant is represented as a vector with repeating values.

See Also:
Serialized Form

Constructor Summary
ConstantVectorExpression()
           
ConstantVectorExpression(int outputColumn, byte[] value)
           
ConstantVectorExpression(int outputColumn, Decimal128 value)
           
ConstantVectorExpression(int outputColumn, double value)
           
ConstantVectorExpression(int outputColumn, long value)
           
 
Method Summary
 void evaluate(VectorizedRowBatch vrg)
          This is the primary method to implement expression logic.
 byte[] getBytesValue()
           
 VectorExpressionDescriptor.Descriptor getDescriptor()
           
 double getDoubleValue()
           
 long getLongValue()
           
 int getOutputColumn()
          Returns the index of the output column in the array of column vectors.
 org.apache.hadoop.hive.ql.exec.vector.expressions.ConstantVectorExpression.Type getType()
           
 String getTypeString()
           
 void setBytesValue(byte[] bytesValue)
           
 void setDecimalValue(Decimal128 decimalValue)
           
 void setDoubleValue(double doubleValue)
           
 void setLongValue(long longValue)
           
 void setOutputColumn(int outputColumn)
           
 void setOutputType(String type)
          Set type of the output column.
 void setType(org.apache.hadoop.hive.ql.exec.vector.expressions.ConstantVectorExpression.Type type)
           
 void setTypeString(String typeString)
           
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression
getChildExpressions, getInputTypes, getOutputType, setChildExpressions, setInputTypes, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstantVectorExpression

public ConstantVectorExpression()

ConstantVectorExpression

public ConstantVectorExpression(int outputColumn,
                                long value)

ConstantVectorExpression

public ConstantVectorExpression(int outputColumn,
                                double value)

ConstantVectorExpression

public ConstantVectorExpression(int outputColumn,
                                byte[] value)

ConstantVectorExpression

public ConstantVectorExpression(int outputColumn,
                                Decimal128 value)
Method Detail

evaluate

public void evaluate(VectorizedRowBatch vrg)
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

getLongValue

public long getLongValue()

setLongValue

public void setLongValue(long longValue)

getDoubleValue

public double getDoubleValue()

setDoubleValue

public void setDoubleValue(double doubleValue)

getBytesValue

public byte[] getBytesValue()

setBytesValue

public void setBytesValue(byte[] bytesValue)

setDecimalValue

public void setDecimalValue(Decimal128 decimalValue)

getTypeString

public String getTypeString()

setTypeString

public void setTypeString(String typeString)

setOutputColumn

public void setOutputColumn(int outputColumn)

getType

public org.apache.hadoop.hive.ql.exec.vector.expressions.ConstantVectorExpression.Type getType()

setType

public void setType(org.apache.hadoop.hive.ql.exec.vector.expressions.ConstantVectorExpression.Type type)

setOutputType

public void setOutputType(String type)
Description copied from class: VectorExpression
Set type of the output column.

Overrides:
setOutputType in class VectorExpression

getDescriptor

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


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