huangxiaopingRD commented on code in PR #39062:
URL: https://github.com/apache/spark/pull/39062#discussion_r1116532569
##########
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCV2Suite.scala:
##########
@@ -2692,4 +2693,37 @@ class JDBCV2Suite extends QueryTest with
SharedSparkSession with ExplainSuiteHel
JdbcDialects.registerDialect(H2Dialect)
}
}
+
+ test("SPARK-41516: Allow jdbc dialects to override the query used to create
a table") {
+ val customDialect = new JdbcDialect {
+ override def canHandle(url: String): Boolean = H2Dialect.canHandle(url)
+
+ override def createTable(
+ statement: Statement,
+ tableName: String,
+ strSchema: String,
+ options: JdbcOptionsInWrite): Unit = {
+ val createTableOptions = options.createTableOptions
+ statement.executeUpdate(
+ s"CREATE TABLE IF NOT EXISTS $tableName ($strSchema)
$createTableOptions")
Review Comment:
I agree with you, I will remove this test case
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]