HyukjinKwon commented on a change in pull request #23493: [MINOR] Follow up for
SPARK-23936, fixed description of "map_concat" function
URL: https://github.com/apache/spark/pull/23493#discussion_r246239774
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
##########
@@ -516,7 +516,7 @@ case class MapEntries(child: Expression) extends
UnaryExpression with ExpectsInp
examples = """
Examples:
> SELECT _FUNC_(map(1, 'a', 2, 'b'), map(2, 'c', 3, 'd'));
- {1:"a",2:"c",3:"d"}
+ {1:"a",2:"b",2:"c",3:"d"}
Review comment:
which spark version did you use? Duplicated entries were fixed and it shows:
```sql
spark-sql> SELECT map_concat(map(1, 'a', 2, 'b'), map(2, 'c', 3, 'd'));
{1:"a",2:"c",3:"d"}
```
and
```scala
scala> spark.sql("SELECT map_concat(map(1, 'a', 2, 'b'), map(2, 'c', 3,
'd'))").show(20, false)
+--------------------------------------------+
|map_concat(map(1, a, 2, b), map(2, c, 3, d))|
+--------------------------------------------+
|[1 -> a, 2 -> c, 3 -> d] |
+--------------------------------------------+
```
in the current master.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]