HyukjinKwon commented on code in PR #36375:
URL: https://github.com/apache/spark/pull/36375#discussion_r859632283
##########
sql/core/src/test/resources/sql-tests/results/ansi/map.sql.out:
##########
@@ -118,3 +118,15 @@ Key 5 does not exist. To return NULL instead, use
'try_element_at'. If necessary
== SQL(line 1, position 7) ==
select element_at(map(1, 'a', 2, 'b'), 5)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+
+-- !query
+select element_at(map('a', 1, 'b', 2), 'c')
+-- !query schema
+struct<>
+-- !query output
+org.apache.spark.SparkNoSuchElementException
+[MAP_KEY_DOES_NOT_EXIST] Key 'c' does not exist. To return NULL instead, use
'try_element_at'. If necessary set spark.sql.ansi.enabled to false to bypass
this error.
Review Comment:
```suggestion
Key 'c' does not exist. To return NULL instead, use 'try_element_at'. If
necessary set spark.sql.ansi.enabled to false to bypass this error.
```
--
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]