wenlong88 commented on a change in pull request #19188:
URL: https://github.com/apache/flink/pull/19188#discussion_r831959600



##########
File path: 
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -1258,8 +1258,8 @@
                 CastTestSpecBuilder.testCastTo(ARRAY(BIGINT().nullable()))
                         .fromCase(
                                 ARRAY(INT().nullable()),
-                                new GenericArrayData(new Object[] {1, null, 
2}),
-                                new GenericArrayData(new Object[] {1L, null, 
2L})),
+                                new GenericArrayData(new Integer[] {1, null, 
2}),
+                                new GenericArrayData(new Long[] {1L, null, 
2L})),

Review comment:
       it seems that the case would not failed with Object array and the change 
above in my local project, there may be some bug  on the validation of the test 
spec.

##########
File path: 
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/ArrayToArrayCastRule.java
##########
@@ -109,7 +110,7 @@ protected String generateCodeBlockInternal(
 
     private static String arrayElementType(LogicalType t) {
         if (t.isNullable()) {

Review comment:
       use if (t.isNullable() && !CodeGenUtils.isPrimitiveNullable(t))?
   when t is primitiveNullable, it would be better to use primitive type




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