Skip to content
Snippets Groups Projects
Unverified Commit 2159bf8b authored by Weiqing Yang's avatar Weiqing Yang Committed by Sean Owen
Browse files

[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 <yangweiqing001@gmail.com>

Closes #16062 from weiqingy/SPARK-18629.
parent ca639163
No related branches found
No related tags found
No related merge requests found
...@@ -199,7 +199,7 @@ class JDBCSuite extends SparkFunSuite ...@@ -199,7 +199,7 @@ class JDBCSuite extends SparkFunSuite
|CREATE TEMPORARY TABLE nullparts |CREATE TEMPORARY TABLE nullparts
|USING org.apache.spark.sql.jdbc |USING org.apache.spark.sql.jdbc
|OPTIONS (url '$url', dbtable 'TEST.EMP', user 'testUser', password 'testPass', |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", " ")) """.stripMargin.replaceAll("\n", " "))
conn.prepareStatement( conn.prepareStatement(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment