You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "RyanSkraba (via GitHub)" <gi...@apache.org> on 2023/03/08 15:46:30 UTC

[GitHub] [flink] RyanSkraba commented on a diff in pull request #22082: [FLINK-31300][table] TRY_CAST for constructed types

RyanSkraba commented on code in PR #22082:
URL: https://github.com/apache/flink/pull/22082#discussion_r1129649372


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/CastRule.java:
##########
@@ -46,7 +46,9 @@ CastExecutor<IN, OUT> create(
             Context context, LogicalType inputLogicalType, LogicalType targetLogicalType);
 
     /** Returns true if the {@link CastExecutor} can fail at runtime. */
-    boolean canFail(LogicalType inputLogicalType, LogicalType targetLogicalType);

Review Comment:
   Yes, this LGTM.
   
   I checked: `ConstructedToConstructedCastRule` is the only other **interface** that attempts to provide a `canFail` default implementation, and there is no other abstract **class** that provides an implementation, so this change should provide the correct implementation to `ArrayToArrayCastRule`, or `MapToMapAndMultisetToMultisetCastRule`



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org