Repository: spark
Updated Branches:
  refs/heads/master ca6391637 -> 2159bf8b2


[SPARK-18629][SQL] Fix numPartition of JDBCSuite Testcase

## What changes were proposed in this pull request?
Fix numPartition of JDBCSuite Testcase.

## How was this patch tested?
Before:
Run any one of the test cases in JDBCSuite, you will get the following warning.
```
10:34:26.389 WARN org.apache.spark.sql.execution.datasources.jdbc.JDBCRelation: 
The number of partitions is reduced because the specified number of partitions 
is less than the difference between upper bound and lower bound. Updated number 
of partitions: 3; Input number of partitions: 4; Lower bound: 1; Upper bound: 4.
```
After: Pass tests without the warning.

Author: Weiqing Yang <[email protected]>

Closes #16062 from weiqingy/SPARK-18629.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/2159bf8b
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/2159bf8b
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/2159bf8b

Branch: refs/heads/master
Commit: 2159bf8b2c0239c111e2f96a86c155a8f584a3d9
Parents: ca63916
Author: Weiqing Yang <[email protected]>
Authored: Fri Dec 2 11:53:15 2016 +0000
Committer: Sean Owen <[email protected]>
Committed: Fri Dec 2 11:53:15 2016 +0000

----------------------------------------------------------------------
 sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/2159bf8b/sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala 
b/sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
index aa1ab14..7f312db 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
@@ -199,7 +199,7 @@ class JDBCSuite extends SparkFunSuite
          |CREATE TEMPORARY TABLE nullparts
          |USING org.apache.spark.sql.jdbc
          |OPTIONS (url '$url', dbtable 'TEST.EMP', user 'testUser', password 
'testPass',
-         |partitionColumn '"Dept"', lowerBound '1', upperBound '4', 
numPartitions '4')
+         |partitionColumn '"Dept"', lowerBound '1', upperBound '4', 
numPartitions '3')
       """.stripMargin.replaceAll("\n", " "))
 
     conn.prepareStatement(


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to