Skip to content

Commit a65d5c6

Browse files
committed
Drop code to set the default value of numSlice for range in SparkSession
1 parent 95e1f0d commit a65d5c6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ class SparkSession private(
514514
@Experimental
515515
@InterfaceStability.Evolving
516516
def range(start: Long, end: Long): Dataset[java.lang.Long] = {
517-
range(start, end, step = 1, numPartitions = sparkContext.defaultParallelism)
517+
range(start, end, step = 1)
518518
}
519519

520520
/**
@@ -527,7 +527,7 @@ class SparkSession private(
527527
@Experimental
528528
@InterfaceStability.Evolving
529529
def range(start: Long, end: Long, step: Long): Dataset[java.lang.Long] = {
530-
range(start, end, step, numPartitions = sparkContext.defaultParallelism)
530+
new Dataset(self, Range(start, end, step, None), Encoders.LONG)
531531
}
532532

533533
/**

sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import org.apache.spark.{AccumulatorSuite, SparkException}
2626
import org.apache.spark.scheduler.{SparkListener, SparkListenerJobStart}
2727
import org.apache.spark.sql.catalyst.util.StringUtils
2828
import org.apache.spark.sql.execution.aggregate
29-
import org.apache.spark.sql.execution.command.ExplainCommand
3029
import org.apache.spark.sql.execution.joins.{BroadcastHashJoinExec, CartesianProductExec, SortMergeJoinExec}
3130
import org.apache.spark.sql.functions._
3231
import org.apache.spark.sql.internal.SQLConf

0 commit comments

Comments
 (0)