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

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

public class StringSubstrColStartLen
extends VectorExpression

This class provides the implementation of vectorized substring, with a start index and length parameters. If the start index is invalid (outside of the string boundaries) then an empty string will be in the output. If the length provided is longer then the string boundary, then it will replace it with the ending index.

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
StringSubstrColStartLen()
           
StringSubstrColStartLen(int colNum, int startIdx, int length, int outputColumn)
           
 
Method Summary
 void evaluate(VectorizedRowBatch batch)
          This is the primary method to implement expression logic.
 int getColNum()
           
 VectorExpressionDescriptor.Descriptor getDescriptor()
           
 int getLength()
           
 int getOutputColumn()
          Returns the index of the output column in the array of column vectors.
 String getOutputType()
          Returns type of the output column.
 int getStartIdx()
           
 void setColNum(int colNum)
           
 void setLength(int length)
           
 void setOutputColumn(int outputColumn)
           
 void setStartIdx(int startIdx)
           
 
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

StringSubstrColStartLen

public StringSubstrColStartLen(int colNum,
                               int startIdx,
                               int length,
                               int outputColumn)

StringSubstrColStartLen

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

getOutputType

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

Overrides:
getOutputType in class VectorExpression

getStartIdx

public int getStartIdx()

setStartIdx

public void setStartIdx(int startIdx)

getColNum

public int getColNum()

setColNum

public void setColNum(int colNum)

getLength

public int getLength()

setLength

public void setLength(int length)

setOutputColumn

public void setOutputColumn(int outputColumn)

getDescriptor

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


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