databend
databend copied to clipboard
Feature: Support map functions
Summary
- [x] #15337
- [x]
MAP_CONTAINS_KEY(<key>, <map>)
Determines whether the specified MAP contains the specified key. @hanxuanliang - [x]
MAP_DELETE(<map>, <key1>[, <key2>, ...])
Returns a MAP based on an existing MAP with one or more keys removed.. - [ ]
MAP_INSERT(<map>, <key>, <value>[, <updateFlag>])
Returns a new MAP consisting of the input MAP with a new key-value pair inserted (an existing key updated with a new value). - [ ]
MAP_PICK(<map>, <key1>[, <key2>, ...])
orMAP_PICK(<map>, <array>)
Returns a new MAP containing the specified key-value pairs from an existing MAP. - [x]
MAP_SIZE(<map>)
Returns the size of a MAP.
Refer to the following documentations: https://docs.snowflake.com/en/sql-reference/functions/map_cat https://docs.snowflake.com/en/sql-reference/functions/map_contains_key https://docs.snowflake.com/en/sql-reference/functions/map_delete https://docs.snowflake.com/en/sql-reference/functions/map_insert https://docs.snowflake.com/en/sql-reference/functions/map_pick https://docs.snowflake.com/en/sql-reference/functions/map_size
Hi @b41sh,
I am interested in taking on the implementation of the feature. If available, I would appreciate being assigned to this task.
Thank you for your consideration.
Hi, @shamb0 Thanks for your attention, you can pick the functions that interest you.
I want to try map_contains_key
https://arrow.apache.org/docs/python/generated/pyarrow.MapType.html#pyarrow.MapType.keys_sorted Is this attribute not supported? If supported, there are more efficient algorithm implementations
I want to try map_contains_key
Hi @hanxuanliang Thank you for your interest, you can work on this function.
https://arrow.apache.org/docs/python/generated/pyarrow.MapType.html#pyarrow.MapType.keys_sorted Is this attribute not supported? If supported, there are more efficient algorithm implementations
currently, we don't support keys_sorted
attribute, considering the compatibility of the previous data, we do not plan to modify it in the short term.
I would like to work on MAP_PICK