public abstract class VectorExpression extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
VectorExpression.Type |
Modifier and Type | Field and Description |
---|---|
protected VectorExpression[] |
childExpressions
Child expressions are evaluated post order.
|
protected VectorExpression.Type[] |
inputTypes
More detailed input types, such as date and timestamp.
|
protected String |
outputType
Output type of the expression.
|
Constructor and Description |
---|
VectorExpression() |
Modifier and Type | Method and Description |
---|---|
abstract void |
evaluate(VectorizedRowBatch batch)
This is the primary method to implement expression logic.
|
protected void |
evaluateChildren(VectorizedRowBatch vrg)
Evaluate the child expressions on the given input batch.
|
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.ArgumentType s. |
void |
setOutputType(String type)
Set type of the output column.
|
String |
toString() |
protected VectorExpression[] childExpressions
protected VectorExpression.Type[] inputTypes
protected String outputType
public abstract void evaluate(VectorizedRowBatch batch)
batch
- public abstract int getOutputColumn()
public String getOutputType()
public void setOutputType(String type)
public void setChildExpressions(VectorExpression[] ve)
public VectorExpression[] getChildExpressions()
public abstract VectorExpressionDescriptor.Descriptor getDescriptor()
protected final void evaluateChildren(VectorizedRowBatch vrg)
vrg
- VectorizedRowBatch
public void setInputTypes(VectorExpression.Type... inputTypes)
VectorExpressionDescriptor.ArgumentType
s. For example, date and
timestamp will be in LongColumnVector
but they need to be
distinguished.inputTypes
- public VectorExpression.Type[] getInputTypes()
Copyright © 2017 The Apache Software Foundation. All rights reserved.