aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeiqing Yang <yangweiqing001@gmail.com>2016-12-02 11:53:15 +0000
committerSean Owen <sowen@cloudera.com>2016-12-02 11:53:15 +0000
commit2159bf8b2c0239c111e2f96a86c155a8f584a3d9 (patch)
tree31ad0fcdaa5033cc138f4f8f58d6692761176adc
parentca6391637212814b7c0bd14c434a6737da17b258 (diff)
downloadspark-2159bf8b2c0239c111e2f96a86c155a8f584a3d9.tar.gz
spark-2159bf8b2c0239c111e2f96a86c155a8f584a3d9.tar.bz2
spark-2159bf8b2c0239c111e2f96a86c155a8f584a3d9.zip
[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.
-rw-r--r--sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala2
1 files changed, 1 insertions, 1 deletions
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 aa1ab141a4..7f312dbddd 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(