cloud-fan commented on a change in pull request #35355:
URL: https://github.com/apache/spark/pull/35355#discussion_r802405960



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala
##########
@@ -229,6 +229,39 @@ abstract class JdbcDialect extends Serializable with 
Logging{
     }
   }
 
+  /**
+   * Create schema with comment.
+   */
+  def createSchemaWithComment(schema: String, comment: String): Array[String] 
= {
+    val clauses = ArrayBuilder.make[String]
+    clauses += s"CREATE SCHEMA ${quoteIdentifier(schema)}"
+    if (comment.nonEmpty) clauses += getSchemaCommentQuery(schema, comment)
+    clauses.result()

Review comment:
       why do we return string here? can we pass in `Connection` and do all the 
work inside this method?




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