JingsongLi commented on a change in pull request #10667: [FLINK-15313][table] 
Fix can't insert decimal data into sink using TypeInformation
URL: https://github.com/apache/flink/pull/10667#discussion_r361246115
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdUniqueKeys.scala
 ##########
 @@ -135,8 +138,8 @@ class FlinkRelMdUniqueKeys private extends 
MetadataHandler[BuiltInMetadata.Uniqu
                 }
               case _ => // ignore
             }
-          //rename
-          case a: RexCall if a.getKind.equals(SqlKind.AS) &&
+          //rename or cast
+          case a: RexCall if (a.getKind.equals(SqlKind.AS) || 
isFidelityCast(a)) &&
 
 Review comment:
   Do we have to add this?
   There are some casts that break uniqueness. For example, if cast fails, it 
will return null.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to