Skip to content

Commit d7a13f8

Browse files
authored
Revert "Upstream merge (#228)"
This reverts commit 4094453.
1 parent 4094453 commit d7a13f8

File tree

466 files changed

+9075
-11621
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

466 files changed

+9075
-11621
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ R-unit-tests.log
2525
R/unit-tests.out
2626
R/cran-check.out
2727
R/pkg/vignettes/sparkr-vignettes.html
28-
R/pkg/tests/fulltests/Rplots.pdf
2928
build/*.jar
3029
build/apache-maven*
3130
build/scala*

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
263263
(New BSD license) Protocol Buffer Java API (org.spark-project.protobuf:protobuf-java:2.4.1-shaded - http://code.google.com/p/protobuf)
264264
(The BSD License) Fortran to Java ARPACK (net.sourceforge.f2j:arpack_combined_all:0.1 - http://f2j.sourceforge.net)
265265
(The BSD License) xmlenc Library (xmlenc:xmlenc:0.52 - http://xmlenc.sourceforge.net)
266-
(The New BSD License) Py4J (net.sf.py4j:py4j:0.10.6 - http://py4j.sourceforge.net/)
266+
(The New BSD License) Py4J (net.sf.py4j:py4j:0.10.4 - http://py4j.sourceforge.net/)
267267
(Two-clause BSD-style license) JUnit-Interface (com.novocode:junit-interface:0.10 - https://github.com/szeiger/junit-interface/)
268268
(BSD licence) sbt and sbt-launch-lib.bash
269269
(BSD 3 Clause) d3.min.js (https://github.com/mbostock/d3/blob/master/LICENSE)

R/pkg/NAMESPACE

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ export("structField",
429429
"structField.character",
430430
"print.structField",
431431
"structType",
432-
"structType.character",
433432
"structType.jobj",
434433
"structType.structField",
435434
"print.structType")
@@ -466,6 +465,5 @@ S3method(print, summary.GBTRegressionModel)
466465
S3method(print, summary.GBTClassificationModel)
467466
S3method(structField, character)
468467
S3method(structField, jobj)
469-
S3method(structType, character)
470468
S3method(structType, jobj)
471469
S3method(structType, structField)

R/pkg/R/DataFrame.R

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,10 +1391,6 @@ setMethod("summarize",
13911391
})
13921392

13931393
dapplyInternal <- function(x, func, schema) {
1394-
if (is.character(schema)) {
1395-
schema <- structType(schema)
1396-
}
1397-
13981394
packageNamesArr <- serialize(.sparkREnv[[".packages"]],
13991395
connection = NULL)
14001396

@@ -1412,8 +1408,6 @@ dapplyInternal <- function(x, func, schema) {
14121408
dataFrame(sdf)
14131409
}
14141410

1415-
setClassUnion("characterOrstructType", c("character", "structType"))
1416-
14171411
#' dapply
14181412
#'
14191413
#' Apply a function to each partition of a SparkDataFrame.
@@ -1424,11 +1418,10 @@ setClassUnion("characterOrstructType", c("character", "structType"))
14241418
#' to each partition will be passed.
14251419
#' The output of func should be a R data.frame.
14261420
#' @param schema The schema of the resulting SparkDataFrame after the function is applied.
1427-
#' It must match the output of func. Since Spark 2.3, the DDL-formatted string
1428-
#' is also supported for the schema.
1421+
#' It must match the output of func.
14291422
#' @family SparkDataFrame functions
14301423
#' @rdname dapply
1431-
#' @aliases dapply,SparkDataFrame,function,characterOrstructType-method
1424+
#' @aliases dapply,SparkDataFrame,function,structType-method
14321425
#' @name dapply
14331426
#' @seealso \link{dapplyCollect}
14341427
#' @export
@@ -1451,17 +1444,6 @@ setClassUnion("characterOrstructType", c("character", "structType"))
14511444
#' y <- cbind(y, y[1] + 1L)
14521445
#' },
14531446
#' schema)
1454-
#'
1455-
#' # The schema also can be specified in a DDL-formatted string.
1456-
#' schema <- "a INT, d DOUBLE, c STRING, d INT"
1457-
#' df1 <- dapply(
1458-
#' df,
1459-
#' function(x) {
1460-
#' y <- x[x[1] > 1, ]
1461-
#' y <- cbind(y, y[1] + 1L)
1462-
#' },
1463-
#' schema)
1464-
#'
14651447
#' collect(df1)
14661448
#' # the result
14671449
#' # a b c d
@@ -1470,7 +1452,7 @@ setClassUnion("characterOrstructType", c("character", "structType"))
14701452
#' }
14711453
#' @note dapply since 2.0.0
14721454
setMethod("dapply",
1473-
signature(x = "SparkDataFrame", func = "function", schema = "characterOrstructType"),
1455+
signature(x = "SparkDataFrame", func = "function", schema = "structType"),
14741456
function(x, func, schema) {
14751457
dapplyInternal(x, func, schema)
14761458
})
@@ -1540,7 +1522,6 @@ setMethod("dapplyCollect",
15401522
#' @param schema the schema of the resulting SparkDataFrame after the function is applied.
15411523
#' The schema must match to output of \code{func}. It has to be defined for each
15421524
#' output column with preferred output column name and corresponding data type.
1543-
#' Since Spark 2.3, the DDL-formatted string is also supported for the schema.
15441525
#' @return A SparkDataFrame.
15451526
#' @family SparkDataFrame functions
15461527
#' @aliases gapply,SparkDataFrame-method
@@ -1560,7 +1541,7 @@ setMethod("dapplyCollect",
15601541
#'
15611542
#' Here our output contains three columns, the key which is a combination of two
15621543
#' columns with data types integer and string and the mean which is a double.
1563-
#' schema <- structType(structField("a", "integer"), structField("c", "string"),
1544+
#' schema <- structType(structField("a", "integer"), structField("c", "string"),
15641545
#' structField("avg", "double"))
15651546
#' result <- gapply(
15661547
#' df,
@@ -1569,15 +1550,6 @@ setMethod("dapplyCollect",
15691550
#' y <- data.frame(key, mean(x$b), stringsAsFactors = FALSE)
15701551
#' }, schema)
15711552
#'
1572-
#' The schema also can be specified in a DDL-formatted string.
1573-
#' schema <- "a INT, c STRING, avg DOUBLE"
1574-
#' result <- gapply(
1575-
#' df,
1576-
#' c("a", "c"),
1577-
#' function(key, x) {
1578-
#' y <- data.frame(key, mean(x$b), stringsAsFactors = FALSE)
1579-
#' }, schema)
1580-
#'
15811553
#' We can also group the data and afterwards call gapply on GroupedData.
15821554
#' For Example:
15831555
#' gdf <- group_by(df, "a", "c")

0 commit comments

Comments
 (0)