You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/08/06 14:54:51 UTC
[GitHub] [flink] JingsongLi commented on a change in pull request #9274:
[FLINK-13495][table-planner-blink] blink-planner should support
varchar/char/decimal precision to connector
JingsongLi 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_r311109696
##########
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 is so short and the logical is simple, and it is invoked by only one place. But it is reasonable to add test.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services