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


##########
core/src/main/java/org/apache/calcite/rex/RexBuilder.java:
##########
@@ -1917,6 +1917,34 @@ public RexLiteral makeZeroLiteral(RelDataType type) {
     return makeLiteral(zeroValue(type), type);
   }
 
+  public RexNode makeZeroForNestedType(RelDataType type) {
+    switch (type.getSqlTypeName()) {
+    case ARRAY:

Review Comment:
   so you think a zero array is an array containing a zero?
   or should it be an empty array?
   the question is "zero for what algebraic operation"?
   for concatenation the empty array is the zero.



##########
core/src/main/java/org/apache/calcite/rex/RexBuilder.java:
##########
@@ -1917,6 +1917,34 @@ public RexLiteral makeZeroLiteral(RelDataType type) {
     return makeLiteral(zeroValue(type), type);
   }
 
+  public RexNode makeZeroForNestedType(RelDataType type) {
+    switch (type.getSqlTypeName()) {
+    case ARRAY:

Review Comment:
   same question for multisets and maps



##########
core/src/main/java/org/apache/calcite/rex/RexBuilder.java:
##########
@@ -1917,6 +1917,34 @@ public RexLiteral makeZeroLiteral(RelDataType type) {
     return makeLiteral(zeroValue(type), type);
   }
 
+  public RexNode makeZeroForNestedType(RelDataType type) {
+    switch (type.getSqlTypeName()) {
+    case ARRAY:

Review Comment:
   I think an empty object makes more sense



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