matriv commented on a change in pull request #18027:
URL: https://github.com/apache/flink/pull/18027#discussion_r763827704



##########
File path: 
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/RowToStringCastRule.java
##########
@@ -92,11 +92,7 @@ protected String generateCodeBlockInternal(
             String returnVariable,
             LogicalType inputLogicalType,
             LogicalType targetLogicalType) {
-        final List<LogicalType> fields =
-                ((RowType) inputLogicalType)
-                        .getFields().stream()
-                                .map(RowType.RowField::getType)
-                                .collect(Collectors.toList());
+        final List<LogicalType> fields = 
LogicalTypeChecks.getFieldTypes(inputLogicalType);

Review comment:
       👍 

##########
File path: 
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -809,6 +824,45 @@
         return new GenericMapData(map);
     }
 
+    public static class MyStructuredType {

Review comment:
       Doesn't this need a short javadoc comment?




-- 
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]


Reply via email to