danny0405 commented on a change in pull request #10518: [FLINK-15124][table] 
Fix types with precision defined in DDL can't be executed
URL: https://github.com/apache/flink/pull/10518#discussion_r356384962
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/SinkCodeGenerator.scala
 ##########
 @@ -223,10 +224,10 @@ object SinkCodeGenerator {
           case (fieldTypeInfo, i) =>
             val requestedTypeInfo = tt.getTypeAt(i)
             validateFieldType(requestedTypeInfo)
-            if (!areTypesCompatible(
-              fromTypeInfoToLogicalType(fieldTypeInfo),
-              fromTypeInfoToLogicalType(requestedTypeInfo)) &&
-              !requestedTypeInfo.isInstanceOf[GenericTypeInfo[Object]]) {
+            if (!PlannerTypeUtils.isAssignable(
+                fromTypeInfoToLogicalType(fieldTypeInfo),
+                fromTypeInfoToLogicalType(requestedTypeInfo)) &&
+                !requestedTypeInfo.isInstanceOf[GenericTypeInfo[Object]]) {
 
 Review comment:
   Should the type be assignable or just equals strictly ? I think it is the 
later.

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