You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Daniel Davies (Jira)" <ji...@apache.org> on 2023/04/11 11:12:00 UTC
[jira] [Created] (SPARK-43094) Array Insert Should Throw On 'Pos' Value 0
Daniel Davies created SPARK-43094:
-------------------------------------
Summary: Array Insert Should Throw On 'Pos' Value 0
Key: SPARK-43094
URL: https://issues.apache.org/jira/browse/SPARK-43094
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 3.3.2
Reporter: Daniel Davies
Wanted to start a discussion about the following comment:
[https://github.com/apache/spark/pull/38867/files#r1157449697]
If a 'pos' of 0 is provided, the code here operates as if the user provided a 1. This could be confusing to users (two incides now overlap and lead to the same result, which is logically a little strange), but perhaps more compellingly, the other functions relying on a provided index, such as elementAt [here|https://github.com/Daniel-Davies/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala#L2344], will raise an exception if provided with an index of 0.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org