alamb commented on PR #11969:
URL: https://github.com/apache/datafusion/pull/11969#issuecomment-2291078903

   > The clickhouse provides a similar function `mapExtractKeyLike `, and 
DuckDB has the same function to get the value with the corresponding key. @alamb
   
   Thank you -- I found it now
   
   [map_extract(map, 
key)](https://duckdb.org/docs/sql/functions/map.html#map_extractmap-key)
   
   Description: Alias of `element_at`. Return a list containing the value for a 
given key or an empty list if the key is not contained in the map. The type of 
the key provided in the second parameter must match the type of the map's keys 
else an error is returned.
   
   Example      
   ```sql
   map_extract(map([100, 5], [42, 43]), 100)
   ```
   
   *Result*:    `[42]`
   
   


-- 
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]

Reply via email to