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_r356390912
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/sources/TableSourceUtil.scala
##########
@@ -100,18 +96,32 @@ object TableSourceUtil {
throw new ValidationException(s"Rowtime field '$name' has invalid
type $t. " +
s"Rowtime attributes must be of TimestampType.")
}
- val (physicalName, idx, tpe) = resolveInputField(name, tableSource)
+ val (physicalName, idx, logicalType) = resolveInputField(name,
tableSource)
// validate that mapped fields are are same type
- if (!isAssignable(fromTypeInfoToLogicalType(tpe), t)) {
+ if (!isAssignable(logicalType, t)) {
Review comment:
No, we can't remove it. The intention here is separating type mis-match and
precision mis-match.
----------------------------------------------------------------
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