spark-instrumented-optimizer/R/pkg
Marek Novotny 5902125ac7 [SPARK-24198][SPARKR][SQL] Adding slice function to SparkR
## What changes were proposed in this pull request?
The PR adds the `slice` function to SparkR. The function returns a subset of consecutive elements from the given array.
```
> df <- createDataFrame(cbind(model = rownames(mtcars), mtcars))
> tmp <- mutate(df, v1 = create_array(df$mpg, df$cyl, df$hp))
> head(select(tmp, slice(tmp$v1, 2L, 2L)))
```
```
  slice(v1, 2, 2)
1          6, 110
2          6, 110
3           4, 93
4          6, 110
5          8, 175
6          6, 105
```

## How was this patch tested?

A test added into R/pkg/tests/fulltests/test_sparkSQL.R

Author: Marek Novotny <mn.mikke@gmail.com>

Closes #21298 from mn-mikke/SPARK-24198.
2018-05-12 19:21:42 +08:00
..
inst [SPARKR] Match pyspark features in SparkR communication protocol. 2018-05-09 10:47:35 -07:00
R [SPARK-24198][SPARKR][SQL] Adding slice function to SparkR 2018-05-12 19:21:42 +08:00
src-native [SPARK-6811] Copy SparkR lib in make-distribution.sh 2015-05-23 00:04:01 -07:00
tests [SPARK-24198][SPARKR][SQL] Adding slice function to SparkR 2018-05-12 19:21:42 +08:00
vignettes [SPARKR][DOC] fix link in vignettes 2018-03-02 09:23:39 -08:00
.lintr [SPARK-22063][R] Fixes lint check failures in R by latest commit sha1 ID of lint-r 2017-10-01 18:42:45 +09:00
.Rbuildignore [SPARK-20877][SPARKR][FOLLOWUP] clean up after test move 2017-06-11 03:00:44 -07:00
DESCRIPTION [SPARKR] Require Java 8 for SparkR 2018-05-11 17:00:51 -07:00
NAMESPACE [SPARK-24198][SPARKR][SQL] Adding slice function to SparkR 2018-05-12 19:21:42 +08:00