Repository: spark Updated Branches: refs/heads/master 6ddbf467b -> c2a2069da
[SPARK-19004][SQL] Fix `JDBCWriteSuite.testH2Dialect` by removing `getCatalystType` ## What changes were proposed in this pull request? `JDBCSuite` and `JDBCWriterSuite` have their own `testH2Dialect`s for their testing purposes. This PR fixes `testH2Dialect` in `JDBCWriterSuite` by removing `getCatalystType` implementation in order to return correct types. Currently, it always returns `Some(StringType)` incorrectly. Note that, for the `testH2Dialect` in `JDBCSuite`, it's intentional because of the test case `Remap types via JdbcDialects`. ## How was this patch tested? This is a test only update. Author: Dongjoon Hyun <[email protected]> Closes #16409 from dongjoon-hyun/SPARK-H2-DIALECT. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c2a2069d Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c2a2069d Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c2a2069d Branch: refs/heads/master Commit: c2a2069dae2bc438b0d196c240c06eac8b4e6761 Parents: 6ddbf46 Author: Dongjoon Hyun <[email protected]> Authored: Tue Dec 27 06:26:56 2016 -0800 Committer: gatorsmile <[email protected]> Committed: Tue Dec 27 06:26:56 2016 -0800 ---------------------------------------------------------------------- .../src/test/scala/org/apache/spark/sql/jdbc/JDBCWriteSuite.scala | 3 --- 1 file changed, 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/c2a2069d/sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCWriteSuite.scala ---------------------------------------------------------------------- diff --git a/sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCWriteSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCWriteSuite.scala index 064958b..f49ac23 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCWriteSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCWriteSuite.scala @@ -44,9 +44,6 @@ class JDBCWriteSuite extends SharedSQLContext with BeforeAndAfter { val testH2Dialect = new JdbcDialect { override def canHandle(url: String) : Boolean = url.startsWith("jdbc:h2") - override def getCatalystType( - sqlType: Int, typeName: String, size: Int, md: MetadataBuilder): Option[DataType] = - Some(StringType) override def isCascadingTruncateTable(): Option[Boolean] = Some(false) } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
