File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
core/src/main/scala/org/apache/spark/rdd Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -62,11 +62,11 @@ class JdbcRDD[T: ClassTag](
6262
6363 override def getPartitions : Array [Partition ] = {
6464 // bounds are inclusive, hence the + 1 here and - 1 on end
65- val length = 1 + BigInt ( upperBound - lowerBound)
65+ val length = BigInt ( 1 ) + upperBound - lowerBound
6666 (0 until numPartitions).map(i => {
67- val start = lowerBound + ((i * length) / numPartitions).toLong
68- val end = lowerBound + (((i + 1 ) * length) / numPartitions).toLong - 1
69- new JdbcPartition (i, start, end)
67+ val start = lowerBound + ((i * length) / numPartitions)
68+ val end = lowerBound + (((i + 1 ) * length) / numPartitions) - 1
69+ new JdbcPartition (i, start.toLong , end.toLong )
7070 }).toArray
7171 }
7272
You can’t perform that action at this time.
0 commit comments