5b4a38d826
## What changes were proposed in this pull request? This pr adds transform_keys function which applies the function to each entry of the map and transforms the keys. ```javascript > SELECT transform_keys(map(array(1, 2, 3), array(1, 2, 3)), (k,v) -> k + 1); map(2->1, 3->2, 4->3) > SELECT transform_keys(map(array(1, 2, 3), array(1, 2, 3)), (k,v) -> k + v); map(2->1, 4->2, 6->3) ``` ## How was this patch tested? Added tests. Closes #22013 from codeatri/SPARK-23939. Authored-by: codeatri <nehapatil6@gmail.com> Signed-off-by: Takuya UESHIN <ueshin@databricks.com> |
||
---|---|---|
.. | ||
java/org/apache/spark/sql | ||
resources | ||
scala/org/apache/spark/sql |