tanclary commented on code in PR #3167:
URL: https://github.com/apache/calcite/pull/3167#discussion_r1187922489


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java:
##########
@@ -3090,6 +3102,13 @@ private static class ItemImplementor extends 
AbstractRexCallImplementor {
         final RexCall call, final List<Expression> argValueList) {
       final MethodImplementor implementor =
           getImplementor(call.getOperands().get(0).getType().getSqlTypeName());
+      // If the structure is an array, two additional arguments are added to 
the argValueList
+      // to denote what the offset is and what the behavior should be if the 
index is out of boudns.
+      if (implementor.method.getName().equals("arrayItemOptional")) {

Review Comment:
   I added a commit that tries to tidy this up by checking the SqlTypeName of 
the collection argument instead of checking the implementor method. Let me know 
what you think.



-- 
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: commits-unsubscr...@calcite.apache.org

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

Reply via email to