slinkydeveloper commented on a change in pull request #18611:
URL: https://github.com/apache/flink/pull/18611#discussion_r807013629
##########
File path:
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/RowToRowCastRule.java
##########
@@ -224,4 +224,13 @@ protected String generateCodeBlockInternal(
writer.stmt(methodCall(writerTerm,
"complete")).assignStmt(returnVariable, rowTerm);
return writer.toString();
}
+
+ @Override
+ public boolean canFail(LogicalType inputLogicalType, LogicalType
targetLogicalType) {
Review comment:
No, because the logic is not the same: the row to row cast rule allows
for target type to have less fields than the source type, so we cannot assert
that the children type list has the same size across the two types. Look a
couple of lines below when i use `Math.min` and also look at the `matches`
method implementation.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]