@PublicEvolving public class LiteralValue extends HierarchyDescriptor
If no type is set, the type is automatically derived from the value. Currently, this is supported for: BOOLEAN, INT, DOUBLE, and VARCHAR.
Examples: - "true", "false" -> BOOLEAN - "42", "-5" -> INT - "2.0", "1234.222" -> DOUBLE - VARCHAR otherwise
| 构造器和说明 |
|---|
LiteralValue() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addPropertiesWithPrefix(String keyPrefix,
DescriptorProperties properties)
Internal method for properties conversion.
|
LiteralValue |
of(String typeString)
Type string of the literal value.
|
LiteralValue |
of(org.apache.flink.api.common.typeinfo.TypeInformation<?> typeInfo)
Type information of the literal value.
|
Map<String,String> |
toProperties()
Converts this descriptor into a set of properties.
|
LiteralValue |
value(BigDecimal value)
Literal DECIMAL value.
|
LiteralValue |
value(boolean value)
Literal BOOLEAN value.
|
LiteralValue |
value(byte value)
Literal TINYINT value.
|
LiteralValue |
value(double value)
Literal DOUBLE value.
|
LiteralValue |
value(float value)
Literal FLOAT value.
|
LiteralValue |
value(int value)
Literal INT value.
|
LiteralValue |
value(long value)
Literal BIGINT value.
|
LiteralValue |
value(short value)
Literal SMALLINT value.
|
LiteralValue |
value(String value)
Literal value either for an explicit VARCHAR type or automatically derived type.
|
public LiteralValue of(org.apache.flink.api.common.typeinfo.TypeInformation<?> typeInfo)
typeInfo - type information describing the valuepublic LiteralValue of(String typeString)
typeString - type string describing the valuepublic LiteralValue value(boolean value)
value - literal BOOLEAN valuepublic LiteralValue value(int value)
value - literal INT valuepublic LiteralValue value(double value)
value - literal DOUBLE valuepublic LiteralValue value(float value)
value - literal FLOAT valuepublic LiteralValue value(String value)
If no type is set, the type is automatically derived from the value. Currently, this is supported for: BOOLEAN, INT, DOUBLE, and VARCHAR.
value - literal valuepublic LiteralValue value(long value)
value - literal BIGINT valuepublic LiteralValue value(byte value)
value - literal TINYINT valuepublic LiteralValue value(short value)
value - literal SMALLINT valuepublic LiteralValue value(BigDecimal value)
value - literal DECIMAL valuepublic Map<String,String> toProperties()
Descriptorpublic void addPropertiesWithPrefix(String keyPrefix, DescriptorProperties properties)
HierarchyDescriptorCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.