From 5d916602bb3f22dd5e61b54b3b22e31696ced65e Mon Sep 17 00:00:00 2001 From: yassan Date: Sat, 30 Mar 2024 15:20:16 +0900 Subject: [PATCH] Document map subscript behavior for non-existent keys --- docs/src/main/sphinx/functions/map.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/main/sphinx/functions/map.md b/docs/src/main/sphinx/functions/map.md index c8cfb508ba86..8ff699fb7041 100644 --- a/docs/src/main/sphinx/functions/map.md +++ b/docs/src/main/sphinx/functions/map.md @@ -2,7 +2,9 @@ ## Subscript operator: \[\] -The `[]` operator is used to retrieve the value corresponding to a given key from a map: +The `[]` operator is used to retrieve the value corresponding to a given key from a map. +This operator throws an error if the key is not contained in the map. +See also `element_at` function that returns `NULL` in such case. ``` SELECT name_to_age_map['Bob'] AS bob_age;