[ 
https://issues.apache.org/jira/browse/SPARK-39432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17553534#comment-17553534
 ] 

Apache Spark commented on SPARK-39432:
--------------------------------------

User 'panbingkun' has created a pull request for this issue:
https://github.com/apache/spark/pull/36855

> 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
>            Priority: Major
>
> 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: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to