Skip to content

Commit c2a2069

Browse files
dongjoon-hyungatorsmile
authored andcommitted
[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.
1 parent 6ddbf46 commit c2a2069

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCWriteSuite.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ class JDBCWriteSuite extends SharedSQLContext with BeforeAndAfter {
4444

4545
val testH2Dialect = new JdbcDialect {
4646
override def canHandle(url: String) : Boolean = url.startsWith("jdbc:h2")
47-
override def getCatalystType(
48-
sqlType: Int, typeName: String, size: Int, md: MetadataBuilder): Option[DataType] =
49-
Some(StringType)
5047
override def isCascadingTruncateTable(): Option[Boolean] = Some(false)
5148
}
5249

0 commit comments

Comments
 (0)