Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.3.0
-
None
Description
spark-sql> SELECT element_at(array('a', 'b', 'c'), index) FROM VALUES(0), (2) AS T(index);
22/06/09 16:23:07 ERROR SparkSQLDriver: Failed in [SELECT element_at(array('a', 'b', 'c'), index) FROM VALUES(0), (2) AS T(index)]
java.lang.ArrayIndexOutOfBoundsException: SQL array indices start at 1
at org.apache.spark.sql.errors.QueryExecutionErrors$.sqlArrayIndexNotStartAtOneError(QueryExecutionErrors.scala:1206)
This should roll into INVALID_ARRAY_IN_ELEMENT_AT. Makes no sense to make a new error class