Github user sun-rui commented on a diff in the pull request: https://github.com/apache/spark/pull/12493#discussion_r60858977 --- Diff: R/pkg/inst/worker/worker.R --- @@ -100,7 +109,24 @@ if (isEmpty != 0) { # Timing reading input data for execution inputElap <- elapsedSecs() - output <- computeFunc(partition, data) + if (isDataFrame) { + if (deserializer == "row") { + # Transform the list of rows into a data.frame + data <- do.call(rbind.data.frame, c(data, stringsAsFactors = FALSE)) + names(data) <- colNames + } else { + # Check to see if data is a valid data.frame + stopifnot(class(data) == "data.frame") + } + output <- computeFunc(data) + if (serializer == "row") { + # Transform the result data.frame back to a list of rows + output <- split(output, seq(nrow(output))) + } --- End diff -- added assert
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org