godfreyhe commented on a change in pull request #9274: 
[FLINK-13495][table-planner-blink] blink-planner should support 
varchar/char/decimal precision to connector
URL: https://github.com/apache/flink/pull/9274#discussion_r310955850
 
 

 ##########
 File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/types/PlannerTypeUtils.java
 ##########
 @@ -110,4 +110,45 @@ public static boolean isInteroperable(LogicalType t1, 
LogicalType t2) {
                                return t1.copy(true).equals(t2.copy(true));
                }
        }
+
+       /**
+        * Now in the conversion to the TypeInformation from DataType, type may 
loose some information
+        * about nullable and precision. So we add this method to do a soft 
check.
+        * The difference of {@link #isInteroperable} is ignore decimal 
precision.
+        */
+       public static boolean isAssignable(LogicalType t1, LogicalType t2) {
 
 Review comment:
   it's a little weird that this util method is introduced independently 
without tests and usage. add some tests for this method ?

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