chucheng92 commented on code in PR #3320:
URL: https://github.com/apache/calcite/pull/3320#discussion_r1283227158


##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -4107,6 +4113,97 @@ public static List arrayExcept(List list1, List list2) {
     return new ArrayList<>(result);
   }
 
+  /** Support the ARRAY_INSERT(array, pos, val) function. */
+  public static @Nullable List arrayInsert(List baselist, Object pos, Object 
val) {

Review Comment:
   @NobiGo e.g. array_insert(array(1,2,3), 1, 2) calcite will parse and search 
`arrayInsert[interface java.util.List, int, int]` signature, but it can't match 
`arrayInsert(List baselist, Integer pos, Object val)`. Java method reflection 
limits boxing and primitive types can't be matched. But here we allow null and 
need to be a reference 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