@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.
| Constructor and Description |
|---|
ValueLiteralExpression(Object value) |
ValueLiteralExpression(Object value,
DataType dataType) |
| Modifier and Type | Method and Description |
|---|---|
<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() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitasSerializableStringpublic ValueLiteralExpression(Object value)
public boolean isNull()
public <T> Optional<T> getValueAs(Class<T> clazz)
public DataType getOutputDataType()
ResolvedExpressiongetOutputDataType in interface ResolvedExpressionpublic List<ResolvedExpression> getResolvedChildren()
getResolvedChildren in interface ResolvedExpressionpublic String asSummaryString()
ExpressionasSummaryString in interface Expressionpublic List<Expression> getChildren()
getChildren in interface Expressionpublic <R> R accept(ExpressionVisitor<R> visitor)
accept in interface ExpressionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.