You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/30 02:45:09 UTC

[GitHub] [spark] huangxiaopingRD commented on a diff in pull request #39062: [SPARK-41516] [SQL] Allow jdbc dialects to override the query used to create a table

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


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -135,6 +135,18 @@ abstract class JdbcDialect extends Serializable with Logging {
     s""""$colName""""
   }
 
+  /**
+   * Get the SQL query that should be used to create a table. Dialects can
+   * override this method to return a query that works best in a particular database.
+   * @param tableName The name of the table.
+   * @param strSchema The string of the schema.
+   * @param createTableOptions The string of the options that to allow certain options to append
+   *             when create a new table, which can be table_options or partition_options.
+   */
+  def createTable(tableName: String, strSchema: String, createTableOptions: String): String = {

Review Comment:
   Yes, you are right, strSchema comes from the existing JdbcUtils.schemaString, this method is to generate schema strings according to different databases



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org