wuchong 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_r356393254
##########
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),
Review comment:
I added an additional indent to make the code readable (separate from the
following code block). But I can revert it if you think the original style is
correct.
----------------------------------------------------------------
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