twalthr commented on a change in pull request #6282: [FLINK-6847][FLINK-6813] 
[table] TimestampDiff table api and sql support
URL: https://github.com/apache/flink/pull/6282#discussion_r208161286
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/ScalarOperators.scala
 ##########
 @@ -861,6 +865,35 @@ object ScalarOperators {
           (l, r) => s"${qualifyMethod(BuiltInMethod.ADD_MONTHS.method)}($l, 
$op($r))"
         }
 
+      case (l: SqlTimeTypeInfo[_], r: SqlTimeTypeInfo[_]) if !plus =>
+        generateOperatorIfNotNull(nullCheck, LONG_TYPE_INFO, left, right) {
 
 Review comment:
   Is always returning `LONG_TYPE_INFO` in sync with MySQL and Calcite? We need 
to make sure that the type information is in sync with Calcite's Sql type. 
Otherwise we get a type mismatch in a following operation.

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


With regards,
Apache Git Services

Reply via email to