Serge Rielau created SPARK-39432:
------------------------------------
Summary: element_at(*, 0) does not return
INVALID_ARRAY_INDEX_IN_ELEMENT_AT
Key: SPARK-39432
URL: https://issues.apache.org/jira/browse/SPARK-39432
Project: Spark
Issue Type: Improvement
Components: Spark Core
Affects Versions: 3.3.0
Reporter: Serge Rielau
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
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]