spark-instrumented-optimizer/sql/catalyst/src/main
Takuya UESHIN 02f967795b [SPARK-23908][SQL] Add transform function.
## What changes were proposed in this pull request?

This pr adds `transform` function which transforms elements in an array using the function.
Optionally we can take the index of each element as the second argument.

```sql
> SELECT transform(array(1, 2, 3), x -> x + 1);
 array(2, 3, 4)
> SELECT transform(array(1, 2, 3), (x, i) -> x + i);
 array(1, 3, 5)
```

## How was this patch tested?

Added tests.

Author: Takuya UESHIN <ueshin@databricks.com>

Closes #21954 from ueshin/issues/SPARK-23908/transform.
2018-08-02 13:00:33 -07:00
..
antlr4/org/apache/spark/sql/catalyst/parser [SPARK-23908][SQL] Add transform function. 2018-08-02 13:00:33 -07:00
java/org/apache/spark/sql [SPARK-23901][SQL] Removing masking functions 2018-07-16 14:28:35 -07:00
scala/org/apache/spark/sql [SPARK-23908][SQL] Add transform function. 2018-08-02 13:00:33 -07:00