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 2020/04/23 13:55:12 UTC

[GitHub] [flink] zjuwangg commented on a change in pull request #11848: [FLINK-17313]fix type validation error when sink table ddl exists column with precision of decimal/timestamp/varchar

zjuwangg commented on a change in pull request #11848:
URL: https://github.com/apache/flink/pull/11848#discussion_r413809329



##########
File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/TypeMappingUtils.java
##########
@@ -158,19 +158,33 @@ public static void checkPhysicalLogicalTypeCompatible(
 			String physicalFieldName,
 			String logicalFieldName,
 			boolean isSource) {
-		checkIfCompatible(
-			physicalFieldType,
-			logicalFieldType,
-			(cause) -> new ValidationException(
-				String.format(
-					"Type %s of table field '%s' does not match with " +
-						"the physical type %s of the '%s' field of the %s.",
+		if (isSource) {
+			checkIfCompatible(
+					physicalFieldType,
+					logicalFieldType,
+					(cause) -> new ValidationException(
+								String.format("Type %s of table field '%s' does not match with " +
+									"the physical type %s of the '%s' field of the %s.",
+										logicalFieldType,
+										logicalFieldName,
+										physicalFieldType,
+										physicalFieldName,
+										"TableSource return type"),

Review comment:
       ok




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