Github user falaki commented on a diff in the pull request: https://github.com/apache/spark/pull/19551#discussion_r146160421 --- Diff: R/pkg/R/DataFrame.R --- @@ -1191,6 +1191,9 @@ setMethod("collect", vec <- do.call(c, col) stopifnot(class(vec) != "list") class(vec) <- PRIMITIVE_TYPES[[colType]] + if (stringsAsFactors && is.character(vec)) { --- End diff -- For performance maybe it is better to reverse the order of checks: `is.character(vec) && stringsAsFactors`
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org