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


##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -3626,11 +3626,15 @@ public static String replace(String s, String search, 
String replacement) {
 
   /** Helper for "array element reference". Caller has already ensured that
    * array and index are not null. Index is 1-based, per SQL. */
-  public static @Nullable Object arrayItem(List list, int item) {
-    if (item < 1 || item > list.size()) {
-      return null;
+  public static @Nullable Object arrayItem(List list, int item, int offset, 
boolean safe) {

Review Comment:
   javadoc says 'index is 1-based, per SQL'. It is now lying.
   
   You MUST revise javadoc.



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