presto-main/src/main/java/io/prestosql/operator/scalar/ArraySubscriptOperator.java/ArraySubscriptOperator/checkArrayIndex
class ArraySubscriptOperator:    public static void checkArrayIndex(long index)
    {
        if (index == 0) {
            throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "SQL array indices start at 1");
        }
        if (index < 0) {
            throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "Array subscript is negative: " + index);
        }
    }