xiedeyantu commented on code in PR #4288:
URL: https://github.com/apache/calcite/pull/4288#discussion_r2032109262


##########
core/src/main/java/org/apache/calcite/rex/RexBuilder.java:
##########
@@ -1918,31 +1918,24 @@ public RexLiteral makeZeroLiteral(RelDataType type) {
   }
 
   public RexNode makeZeroForNestedType(RelDataType type) {
+    SqlOperator op;
     switch (type.getSqlTypeName()) {
     case ARRAY:
-      ArraySqlType arrayType = (ArraySqlType) type;
-      RexNode zeroElement = 
makeZeroForNestedType(arrayType.getComponentType());
-      return makeCall(type, SqlStdOperatorTable.ARRAY_VALUE_CONSTRUCTOR,
-          ImmutableList.of(zeroElement));
+      op = SqlStdOperatorTable.ARRAY_VALUE_CONSTRUCTOR;

Review Comment:
   When using CAST, may need to write something like ARRAY[]::INTEGER? I may 
not be clear about the correct way to write it, but I think it need to write 
all types.



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