wangxlong commented on a change in pull request #9931: 
[FLINK-14441][Table-Common] Fix ValueLiteralExpression#getValueAs when 
valueClass is Period.class
URL: https://github.com/apache/flink/pull/9931#discussion_r336856655
 
 

 ##########
 File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/expressions/ValueLiteralExpression.java
 ##########
 @@ -106,7 +106,7 @@ else if (valueClass == Long.class && clazz == 
Duration.class) {
 
                else if (valueClass == Period.class && clazz == Integer.class) {
                        final Period period = (Period) value;
-                       convertedValue = period.toTotalMonths();
+                       convertedValue = (int)period.toTotalMonths();
 
 Review comment:
   Thank you very much @wuchong. I have fix it.

----------------------------------------------------------------
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