You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/03/22 02:17:04 UTC

[GitHub] [flink] wenlong88 commented on a change in pull request #19188: [FLINK-26770][table] Fix ArrayToArrayCastRule array type

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

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