You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by yh...@apache.org on 2016/03/04 05:35:44 UTC
spark git commit: [SPARK-12941][SQL][MASTER] Spark-SQL JDBC Oracle
dialect fails to map string datatypes to Oracle VARCHAR datatype mapping
Repository: spark
Updated Branches:
refs/heads/master 15d57f9c2 -> f6ac7c30d
[SPARK-12941][SQL][MASTER] Spark-SQL JDBC Oracle dialect fails to map string datatypes to Oracle VARCHAR datatype mapping
## What changes were proposed in this pull request?
A test suite added for the bug fix -SPARK 12941; for the mapping of the StringType to corresponding in Oracle
## How was this patch tested?
manual tests done
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
Author: thomastechs <th...@tcs.com>
Author: THOMAS SEBASTIAN <th...@tcs.com>
Closes #11489 from thomastechs/thomastechs-12941-master-new.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f6ac7c30
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f6ac7c30
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f6ac7c30
Branch: refs/heads/master
Commit: f6ac7c30d48e666618466e825578fa457e2a0ed4
Parents: 15d57f9
Author: thomastechs <th...@tcs.com>
Authored: Thu Mar 3 20:35:40 2016 -0800
Committer: Yin Huai <yh...@databricks.com>
Committed: Thu Mar 3 20:35:40 2016 -0800
----------------------------------------------------------------------
.../src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/f6ac7c30/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 b0d64aa..dfffa58 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
@@ -645,4 +645,10 @@ class JDBCSuite extends SparkFunSuite
r => assert(!List("testPass", "testUser").exists(r.toString.contains))
}
}
+
+ test("SPARK 12941: The data type mapping for StringType to Oracle") {
+ val oracleDialect = JdbcDialects.get("jdbc:oracle://127.0.0.1/db")
+ assert(oracleDialect.getJDBCType(StringType).
+ map(_.databaseTypeDefinition).get == "VARCHAR2(255)")
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org