alamb commented on code in PR #11969:
URL: https://github.com/apache/datafusion/pull/11969#discussion_r1717596260


##########
docs/source/user-guide/sql/scalar_functions.md:
##########
@@ -3700,6 +3701,36 @@ SELECT MAKE_MAP('POST', 41, 'HEAD', 33, 'PATCH', null);
 {POST: 41, HEAD: 33, PATCH: }
 ```
 
+### `map_extract`

Review Comment:
   😍 



##########
datafusion/sqllogictest/test_files/map.slt:
##########
@@ -468,3 +468,33 @@ select cardinality(map([1, 2, 3], ['a', 'b', 'c'])), 
cardinality(MAP {'a': 1, 'b
        cardinality(MAP {'a': MAP {1:'a', 2:'b', 3:'c'}, 'b': MAP {2:'c', 
4:'d'} });
 ----
 3 2 0 2
+
+# map_extract

Review Comment:
   I think we should also add some tests when the MAP is a column -- these 
tests cover the case when the `MAP` is a scalar (single value)
   
   So for example, create a table with the values in it like:
   
   ```sql
   CREATE TABLE ... AS VALUES (MAP { ..}), ...
   ```



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to