Class ExpressionUtils
- java.lang.Object
-
- org.apache.flink.table.expressions.ExpressionUtils
-
@Internal public final class ExpressionUtils extends Object
Utility methods for working withExpression
s.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> Optional<V>
extractValue(Expression expression, Class<V> targetClass)
Extracts the value (excluding null) of a given class from an expression assuming it is aValueLiteralExpression
.
-
-
-
Method Detail
-
extractValue
public static <V> Optional<V> extractValue(Expression expression, Class<V> targetClass)
Extracts the value (excluding null) of a given class from an expression assuming it is aValueLiteralExpression
.- Type Parameters:
V
- type of extracted value- Parameters:
expression
- literal to extract the value fromtargetClass
- expected class to extract from the literal- Returns:
- extracted value or empty if could not extract value of given type
-
-