Class ExpressionUtils
java.lang.Object
org.apache.flink.table.expressions.ExpressionUtils
Utility methods for working with
Expressions.-
Method Summary
Modifier and TypeMethodDescriptionstatic <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 Details
-
extractValue
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
-