wenlong88 commented on a change in pull request #19188: URL: https://github.com/apache/flink/pull/19188#discussion_r831711483
########## 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()) { - return "Object"; + return CodeGenUtils.boxedTypeTermForType(t); } switch (t.getTypeRoot()) { case BOOLEAN: Review comment: hi, I think it would be better to use CodeGenUtils.primitiveTypeTermForType instead, what do you think? Maybe we need to check isPrimitiveNullable first when t is nullable, if it is true, we should use primitiveType instead of boxedType. -- 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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org