Class Expression
- java.lang.Object
-
- org.apache.iotdb.db.mpp.plan.expression.Expression
-
- Direct Known Subclasses:
BinaryExpression,FunctionExpression,LeafOperand,TernaryExpression,UnaryExpression
public abstract class Expression extends java.lang.ObjectA skeleton class for expression
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.IntegerinputColumnIndexprotected java.lang.BooleanisConstantOperandCache
-
Constructor Summary
Constructors Constructor Description Expression()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <R,C>
Raccept(ExpressionVisitor<R,C> visitor, C context)Accessible forExpressionVisitor, useExpressionVisitor.process(org.apache.iotdb.db.mpp.plan.expression.Expression, C)instead.abstract voidbindInputLayerColumnIndexWithExpression(java.util.Map<java.lang.String,java.util.List<InputLocation>> inputLocations)abstract voidbindInputLayerColumnIndexWithExpression(UDTFPlan udtfPlan)Deprecated.protected static voidcheckInputExpressionDataType(java.lang.String expressionString, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType actual, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType... expected)abstract voidcollectPaths(java.util.Set<org.apache.iotdb.commons.path.PartialPath> pathSet)Deprecated.abstract voidconcat(java.util.List<org.apache.iotdb.commons.path.PartialPath> prefixPaths, java.util.List<Expression> resultExpressions)Deprecated.abstract voidconstructUdfExecutors(java.util.Map<java.lang.String,UDTFExecutor> expressionName2Executor, java.time.ZoneId zoneId)static Expressiondeserialize(java.nio.ByteBuffer byteBuffer)booleanequals(java.lang.Object o)Sub-classes must not override this method.abstract java.util.List<Expression>getExpressions()returns the DIRECT children expressions if it has any, otherwise an EMPTY list will be returnedjava.lang.StringgetExpressionString()Get the representation of the expression in string.protected abstract java.lang.StringgetExpressionStringInternal()Sub-classes should override this method to provide valid string representation of this object.abstract ExpressionTypegetExpressionType()java.lang.IntegergetInputColumnIndex()inthashCode()Sub-classes must not override this method.abstract org.apache.iotdb.tsfile.file.metadata.enums.TSDataTypeinferTypes(TypeProvider typeProvider)booleanisBuiltInAggregationFunctionExpression()booleanisCompareBinaryExpression()booleanisConstantOperand()If this expression and all of its sub-expressions areConstantOperand.protected abstract booleanisConstantOperandInternal()Sub-classes should override this method indicating if the expression is a constant operandabstract booleanisMappable(TypeProvider typeProvider)booleanisTimeSeriesGeneratingFunctionExpression()booleanisUserDefinedAggregationFunctionExpression()java.util.Iterator<Expression>iterator()returns an iterator to traverse all the successor expressions in a level-orderabstract voidremoveWildcards(WildcardsRemover wildcardsRemover, java.util.List<Expression> resultExpressions)Deprecated.protected abstract voidserialize(java.io.DataOutputStream stream)protected abstract voidserialize(java.nio.ByteBuffer byteBuffer)static voidserialize(Expression expression, java.io.DataOutputStream stream)static voidserialize(Expression expression, java.nio.ByteBuffer byteBuffer)java.lang.StringtoString()Sub-classes must not override this method.abstract voidupdateStatisticsForMemoryAssigner(LayerMemoryAssigner memoryAssigner)
-
-
-
Method Detail
-
accept
public <R,C> R accept(ExpressionVisitor<R,C> visitor, C context)
Accessible forExpressionVisitor, useExpressionVisitor.process(org.apache.iotdb.db.mpp.plan.expression.Expression, C)instead.
-
getExpressionType
public abstract ExpressionType getExpressionType()
-
isBuiltInAggregationFunctionExpression
public boolean isBuiltInAggregationFunctionExpression()
-
isUserDefinedAggregationFunctionExpression
public boolean isUserDefinedAggregationFunctionExpression()
-
isTimeSeriesGeneratingFunctionExpression
public boolean isTimeSeriesGeneratingFunctionExpression()
-
isCompareBinaryExpression
public boolean isCompareBinaryExpression()
-
isMappable
public abstract boolean isMappable(TypeProvider typeProvider)
-
isConstantOperand
public final boolean isConstantOperand()
If this expression and all of its sub-expressions areConstantOperand.
-
isConstantOperandInternal
protected abstract boolean isConstantOperandInternal()
Sub-classes should override this method indicating if the expression is a constant operand
-
concat
@Deprecated public abstract void concat(java.util.List<org.apache.iotdb.commons.path.PartialPath> prefixPaths, java.util.List<Expression> resultExpressions)Deprecated.
-
removeWildcards
@Deprecated public abstract void removeWildcards(WildcardsRemover wildcardsRemover, java.util.List<Expression> resultExpressions) throws LogicalOptimizeException
Deprecated.- Throws:
LogicalOptimizeException
-
collectPaths
@Deprecated public abstract void collectPaths(java.util.Set<org.apache.iotdb.commons.path.PartialPath> pathSet)
Deprecated.
-
constructUdfExecutors
public abstract void constructUdfExecutors(java.util.Map<java.lang.String,UDTFExecutor> expressionName2Executor, java.time.ZoneId zoneId)
-
inferTypes
public abstract org.apache.iotdb.tsfile.file.metadata.enums.TSDataType inferTypes(TypeProvider typeProvider)
-
checkInputExpressionDataType
protected static void checkInputExpressionDataType(java.lang.String expressionString, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType actual, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType... expected)
-
bindInputLayerColumnIndexWithExpression
@Deprecated public abstract void bindInputLayerColumnIndexWithExpression(UDTFPlan udtfPlan)
Deprecated.
-
bindInputLayerColumnIndexWithExpression
public abstract void bindInputLayerColumnIndexWithExpression(java.util.Map<java.lang.String,java.util.List<InputLocation>> inputLocations)
-
getInputColumnIndex
public java.lang.Integer getInputColumnIndex()
-
updateStatisticsForMemoryAssigner
public abstract void updateStatisticsForMemoryAssigner(LayerMemoryAssigner memoryAssigner)
-
toString
public final java.lang.String toString()
Sub-classes must not override this method.- Overrides:
toStringin classjava.lang.Object
-
getExpressionString
public final java.lang.String getExpressionString()
Get the representation of the expression in string. The hash code of the returned value will be the hash code of this object. SeehashCode()andequals(Object). In other words, same expressions should have exactly the same string representation, and different expressions must have different string representations.
-
getExpressionStringInternal
protected abstract java.lang.String getExpressionStringInternal()
Sub-classes should override this method to provide valid string representation of this object. SeegetExpressionString()
-
hashCode
public final int hashCode()
Sub-classes must not override this method.- Overrides:
hashCodein classjava.lang.Object
-
equals
public final boolean equals(java.lang.Object o)
Sub-classes must not override this method.- Overrides:
equalsin classjava.lang.Object
-
getExpressions
public abstract java.util.List<Expression> getExpressions()
returns the DIRECT children expressions if it has any, otherwise an EMPTY list will be returned
-
serialize
public static void serialize(Expression expression, java.nio.ByteBuffer byteBuffer)
-
serialize
public static void serialize(Expression expression, java.io.DataOutputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
deserialize
public static Expression deserialize(java.nio.ByteBuffer byteBuffer)
-
serialize
protected abstract void serialize(java.nio.ByteBuffer byteBuffer)
-
serialize
protected abstract void serialize(java.io.DataOutputStream stream) throws java.io.IOException- Throws:
java.io.IOException
-
iterator
public final java.util.Iterator<Expression> iterator()
returns an iterator to traverse all the successor expressions in a level-order
-
-