twalthr commented on a change in pull request #8510:  [FLINK-12254][table] 
Update cast() and TypeLiteralExpression to new type system
URL: https://github.com/apache/flink/pull/8510#discussion_r287703089
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ApiExpressionUtils.java
 ##########
 @@ -85,17 +83,7 @@ public static Expression toMonthInterval(Expression e, int 
multiplier) {
                // check for constant
                return ExpressionUtils.extractValue(e, 
BasicTypeInfo.INT_TYPE_INFO)
                        .map((v) -> (Expression) valueLiteral(v * multiplier, 
TimeIntervalTypeInfo.INTERVAL_MONTHS))
-                       .orElse(
 
 Review comment:
   Yes, that's right but this behavior was not even tested somewhere and for 
simplification of the design I think it is ok to limit the values to constants. 
What do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to