MaxGekk commented on code in PR #42655:
URL: https://github.com/apache/spark/pull/42655#discussion_r1304347466
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -4185,6 +4185,18 @@ object SQLConf {
.booleanConf
.createWithDefault(false)
+ val LEGACY_NEGATIVE_INDEX_IN_ARRAY_INSERT =
+ buildConf("spark.sql.legacy.negativeIndexInArrayInsert")
+ .internal()
+ .doc("When set to true, restores the legacy behavior of `array_insert`
for " +
+ "negative indexes - 0-based: the function inserts new element before
the last one " +
+ "for the index -1. For example, `array_insert(['a', 'b'], -1, 'x')`
returns " +
+ "`['a', 'x', 'b']`. When set to false, the -1 index points out to the
last element, " +
+ "and the given example produces `['a', 'b', 'x']`.")
+ .version("3.5.0")
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]