Xiao Li created SPARK-23937: ------------------------------- Summary: High-order function: map_filter(map<K, V>, function<K, V, boolean>) → MAP<K,V> Key: SPARK-23937 URL: https://issues.apache.org/jira/browse/SPARK-23937 Project: Spark Issue Type: Sub-task Components: SQL Affects Versions: 2.3.0 Reporter: Xiao Li
Constructs a map from those entries of map for which function returns true: {noformat} SELECT map_filter(MAP(ARRAY[], ARRAY[]), (k, v) -> true); -- {} SELECT map_filter(MAP(ARRAY[10, 20, 30], ARRAY['a', NULL, 'c']), (k, v) -> v IS NOT NULL); -- {10 -> a, 30 -> c} SELECT map_filter(MAP(ARRAY['k1', 'k2', 'k3'], ARRAY[20, 3, 15]), (k, v) -> v > 10); -- {k1 -> 20, k3 -> 15} {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org