File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
main/scala/org/apache/spark/sql/execution/datasources/jdbc
test/scala/org/apache/spark/sql/jdbc Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ private[sql] object JDBCRelation extends Logging {
6464 s " bound. Lower bound: $lowerBound; Upper bound: $upperBound" )
6565
6666 val numPartitions =
67- if ((upperBound - lowerBound) >= partitioning.numPartitions ||
68- (upperBound - lowerBound) < 0 ) {
67+ if ((upperBound - lowerBound) >= partitioning.numPartitions || /* check for overflow */
68+ (upperBound - lowerBound) < 0 ) {
6969 partitioning.numPartitions
7070 } else {
7171 logWarning(" The number of partitions is reduced because the specified number of " +
Original file line number Diff line number Diff line change @@ -389,7 +389,6 @@ class JDBCSuite extends SparkFunSuite
389389 val df = sql(" SELECT * FROM partsoverflow" )
390390 checkNumPartitions(df, expectedNumPartitions = 3 )
391391 assert(df.collect().length == 3 )
392-
393392 }
394393
395394 test(" Register JDBC query with renamed fields" ) {
You can’t perform that action at this time.
0 commit comments