srielau commented on code in PR #38867: URL: https://github.com/apache/spark/pull/38867#discussion_r1157449697
########## sql/core/src/test/resources/sql-tests/results/array.sql.out: ########## @@ -431,6 +431,104 @@ struct<get(array(1, 2, 3), -1):int> NULL +-- !query +select array_insert(array(1, 2, 3), 3, 4) +-- !query schema +struct<array_insert(array(1, 2, 3), 3, 4):array<int>> +-- !query output +[1,2,4,3] + + +-- !query +select array_insert(array(2, 3, 4), 0, 1) Review Comment: I think this 0 behavior is a trap. It invites the belief that array_isert is 0 based. -- 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]
