@PublicEvolving public final class ValueLiteralExpression extends Object implements ResolvedExpression
By design, this class can take any value described by a DataType. However, it is
recommended to use instances with default conversion (see DataType.getConversionClass().
Equals/hashCode support of this expression depends on the equals/hashCode support of the value.
The data type can be extracted automatically from non-null values using value-based extraction
(see ValueDataTypeConverter).
Symbols (enums extending from TableSymbol) are considered as literal values.
| 构造器和说明 |
|---|
ValueLiteralExpression(Object value) |
ValueLiteralExpression(Object value,
DataType dataType) |
| 限定符和类型 | 方法和说明 |
|---|---|
<R> R |
accept(ExpressionVisitor<R> visitor) |
String |
asSummaryString()
Returns a string that summarizes this expression for printing to a console.
|
boolean |
equals(Object o) |
List<Expression> |
getChildren() |
DataType |
getOutputDataType()
Returns the data type of the computation result.
|
List<ResolvedExpression> |
getResolvedChildren() |
<T> Optional<T> |
getValueAs(Class<T> clazz)
Returns the value (excluding null) as an instance of the given class.
|
int |
hashCode() |
boolean |
isNull() |
String |
toString() |
asSerializableStringpublic boolean isNull()
public <T> Optional<T> getValueAs(Class<T> clazz)
It supports conversions to default conversion classes of LogicalTypes
and additionally to BigDecimal for all types of LogicalTypeFamily.NUMERIC.
This method should not be called with other classes.
Note to implementers: Whenever we add a new class here, make sure to also update the
planner for supporting the class via CallContext.getArgumentValue(int, Class).
public DataType getOutputDataType()
ResolvedExpressiongetOutputDataType 在接口中 ResolvedExpressionpublic List<ResolvedExpression> getResolvedChildren()
getResolvedChildren 在接口中 ResolvedExpressionpublic String asSummaryString()
ExpressionasSummaryString 在接口中 Expressionpublic List<Expression> getChildren()
getChildren 在接口中 Expressionpublic <R> R accept(ExpressionVisitor<R> visitor)
accept 在接口中 ExpressionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.