GitHub user mn-mikke opened a pull request:
https://github.com/apache/spark/pull/21620
[SPARK-24636][SQL] Type coercion of arrays for array_join function
## What changes were proposed in this pull request?
Presto's implementation accepts arbitrary arrays of primitive types as an
input:
```
presto> SELECT array_join(ARRAY [1, 2, 3], ', ');
_col0
---------
1, 2, 3
(1 row)
```
This PR proposes to implement a type coercion rule for ```array_join```
function that converts arrays of primitive as well as non-primitive types to
arrays of string.
## How was this patch tested?
New test cases add into:
- sql-tests/inputs/typeCoercion/native/arrayJoin.sql
- DataFrameFunctionsSuite.scala
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mn-mikke/spark SPARK-24636
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/21620.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #21620
----
commit 98017714e06ea7a730b1515d5bcfd583d7808a5a
Author: Marek Novotny <mn.mikke@...>
Date: 2018-06-23T10:08:42Z
[SPARK-24636][SQL] Type coercion of arrays for array_join function
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]