leonardBang commented on a change in pull request #10027: [FLINK-14549][Table 
SQL/Planner] Bring more detail by using logicalTy…
URL: https://github.com/apache/flink/pull/10027#discussion_r340029566
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/sinks/TableSinkUtils.scala
 ##########
 @@ -50,21 +50,24 @@ object TableSinkUtils {
     val srcFieldTypes = query.getTableSchema.getFieldDataTypes
     val sinkFieldTypes = sink.getTableSchema.getFieldDataTypes
 
-    if (srcFieldTypes.length != sinkFieldTypes.length ||
-      srcFieldTypes.zip(sinkFieldTypes).exists { case (srcF, snkF) =>
-        !PlannerTypeUtils.isInteroperable(
-          fromDataTypeToLogicalType(srcF), fromDataTypeToLogicalType(snkF))
+    val srcLogicalTypes = srcFieldTypes.map(t => fromDataTypeToLogicalType(t))
+    val sinkLogicalTypes = sinkFieldTypes.map(t => 
fromDataTypeToLogicalType(t))
+
+    if (srcLogicalTypes.length != sinkLogicalTypes.length ||
+      srcLogicalTypes.zip(sinkLogicalTypes).exists {
+        case (srcType, sinkType) =>
+        !PlannerTypeUtils.isInteroperable(srcType, sinkType)
 
 Review comment:
   It matches check style,but  I’ll  keep Indentation.

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