beliefer commented on pull request #35355:
URL: https://github.com/apache/spark/pull/35355#issuecomment-1033239231


   > shall we add a new API in JDBC dialect for creating schema with comment? 
then it's more flexible and explicit for different dialects to implement it in 
an atomic way. We can also provide a default implementation which just create 
schema and then set comment.
   
   ```
     /**
       * Create schema with comment.
       */
      def createSchemaWithComment(schema: String, comment: String): 
Array[String] = {
        val clauses = ArrayBuilder.make[String]
        clauses += s"CREATE SCHEMA ${quoteIdentifier(schema)}"
        clauses += getSchemaCommentQuery(schema, comment)
        clauses.result()
      }
   ```
   


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