File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -602,8 +602,7 @@ setMethod("unpersist",
602602setMethod ("repartition ",
603603 signature(x = " SparkDataFrame" ),
604604 function (x , numPartitions = NULL , col = NULL , ... ) {
605- if (! is.null(numPartitions ) && (class(numPartitions ) == " numeric" ||
606- class(numPartitions ) == " integer" )) {
605+ if (! is.null(numPartitions ) && is.numeric(numPartitions )) {
607606 # number of partitions and columns both are specified
608607 if (! is.null(col ) && class(col ) == " Column" ) {
609608 cols <- list (col , ... )
Original file line number Diff line number Diff line change @@ -1025,8 +1025,7 @@ setMethod("keyBy",
10251025setMethod ("repartition ",
10261026 signature(x = " RDD" ),
10271027 function (x , numPartitions ) {
1028- if (! is.null(numPartitions ) && (class(numPartitions ) == " numeric" ||
1029- class(numPartitions ) == " integer" )) {
1028+ if (! is.null(numPartitions ) && is.numeric(numPartitions )) {
10301029 coalesce(x , numPartitions , TRUE )
10311030 } else {
10321031 coalesce(x , 200L , TRUE )
You can’t perform that action at this time.
0 commit comments