GitHub user kiszk opened a pull request: https://github.com/apache/spark/pull/21053
[SPARK-23924][SQL] Add element_at function ## What changes were proposed in this pull request? The PR adds the SQL function array_position. The behavior of the function is based on Presto's one. This function returns element of array at given index in value if column is array, or returns value for the given key in value if column is map. ## How was this patch tested? Added UTs You can merge this pull request into a Git repository by running: $ git pull https://github.com/kiszk/spark SPARK-23924 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/21053.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #21053 ---- commit d7ec6ccc177d07a8090ac27ce1659f427d1cf50a Author: Kazuaki Ishizaki <ishizaki@...> Date: 2018-04-12T13:21:22Z initial commit ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org