beliefer commented on code in PR #39062:
URL: https://github.com/apache/spark/pull/39062#discussion_r1059631845


##########
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala:
##########
@@ -1963,4 +1963,20 @@ class JDBCSuite extends QueryTest with 
SharedSparkSession {
       }
     }
   }
+
+  test("SPARK-41516:  dialect override the method of createTable") {
+    val dialect = new JdbcDialect {
+      override def canHandle(url: String) : Boolean = 
url.startsWith("jdbc:h2:")
+      override def createTable(
+          tableName: String,
+          strSchema: String,
+          createTableOptions: String): String = {
+        s"CREATE TABLE IF NOT EXIST $tableName ($strSchema) 
$createTableOptions"

Review Comment:
   eh. My meaning is you can add the function to 
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/jdbc/MySQLDialect.scala
 or other supported *Dialect. We should prove this PR could works well in real 
scene.



-- 
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]

Reply via email to