HyukjinKwon commented on a change in pull request #27478: [SPARK-25829][SQL]
Add config `spark.sql.deduplicateMapKey.lastWinsPolicy.enabled` and change the
default behavior
URL: https://github.com/apache/spark/pull/27478#discussion_r376163252
##########
File path: python/pyspark/sql/functions.py
##########
@@ -2766,13 +2766,15 @@ def map_concat(*cols):
:param cols: list of column names (string) or list of :class:`Column`
expressions
>>> from pyspark.sql.functions import map_concat
+ >>> spark.conf.set("spark.sql.deduplicateMapKey.lastWinsPolicy.enabled",
"true")
Review comment:
I would don't set this configuration, and change:
```diff
- >>> df = spark.sql("SELECT map(1, 'a', 2, 'b') as map1, map(3, 'c', 1,
'd') as map2")
+ >>> df = spark.sql("SELECT map(1, 'a', 2, 'b') as map1, map(3, 'c') as
map2")
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]