Github user ScrapCodes commented on a diff in the pull request: https://github.com/apache/spark/pull/13839#discussion_r68184305 --- Diff: R/pkg/R/DataFrame.R --- @@ -194,7 +195,13 @@ setMethod("isLocal", setMethod("showDF", signature(x = "SparkDataFrame"), function(x, numRows = 20, truncate = TRUE) { - s <- callJMethod(x@sdf, "showString", numToInt(numRows), truncate) + if (is.logical(truncate) && truncate) { + s <- callJMethod(x@sdf, "showString", numToInt(numRows), numToInt(20)) + } else if (is.numeric(truncate) && truncate > 0) { + s <- callJMethod(x@sdf, "showString", numToInt(numRows), numToInt(truncate)) + } else { + s <- callJMethod(x@sdf, "showString", numToInt(numRows), numToInt(0)) + } --- End diff -- I could have used, `as.numeric(truncate)` and then no if checks. But, to retain older behavior we need to check if it is True and set it to 20.
--- 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