huaxingao commented on a change in pull request #30154:
URL: https://github.com/apache/spark/pull/30154#discussion_r517154290



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/DerbyDialect.scala
##########
@@ -50,4 +50,17 @@ private object DerbyDialect extends JdbcDialect {
   override def renameTable(oldTable: String, newTable: String): String = {
     s"RENAME TABLE $oldTable TO $newTable"
   }
+
+  // Derby currently doesn't support comment on table. Here is the ticket to 
add the support
+  // https://issues.apache.org/jira/browse/DERBY-7008
+  override def createTable(
+      table: String,
+      strSchema: String,
+      createTableOptions: String,
+      tableComment: String): Array[String] = {
+    if (!tableComment.isEmpty) {
+      logWarning("Cannot create JDBC table comment. The table comment will be 
ignored.")

Review comment:
       We don't append comment to the end of the CREATE TABLE statement. It's a 
separate sql statement. If creating comment fails, it doesn't affect the table 
creation, so it can be treated as a special property. We append all the other 
properties to the end of the CREATE TABLE statement as createTableOptions.




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

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



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

Reply via email to