95a651339e
## What changes were proposed in this pull request? This PR proposes to add array_max and array_min in R side too. array_max: ```r df <- createDataFrame(cbind(model = rownames(mtcars), mtcars)) mutated <- mutate(df, v1 = create_array(df$gear, df$am, df$carb)) head(select(mutated, array_max(mutated$v1))) ``` ``` array_max(v1) 1 4 2 4 3 4 4 3 5 3 6 3 ``` array_min: ```r df <- createDataFrame(cbind(model = rownames(mtcars), mtcars)) mutated <- mutate(df, v1 = create_array(df$mpg, df$cyl, df$hp)) head(select(mutated, array_min(mutated$v1))) ``` ``` array_min(v1) 1 6 2 6 3 4 4 6 5 8 6 6 ``` ## How was this patch tested? Unit tests were added in `R/pkg/tests/fulltests/test_sparkSQL.R` and manually tested. Documentation was manually built and verified. Author: hyukjinkwon <gurwls223@apache.org> Closes #21142 from HyukjinKwon/sparkr_array_min_array_max. |
||
---|---|---|
.. | ||
fulltests | ||
run-all.R |