beliefer opened a new pull request #35355:
URL: https://github.com/apache/spark/pull/35355


   ### What changes were proposed in this pull request?
   Currently, `JDBCTableCatalog.scala` query namespaces show below.
         ```
   val schemaBuilder = ArrayBuilder.make[Array[String]]
         val rs = conn.getMetaData.getSchemas()
         while (rs.next()) {
           schemaBuilder += Array(rs.getString(1))
         }
         schemaBuilder.result
   ```
   But the code cannot get any information when using MySQL JDBC driver.
   This PR uses `SHOW SCHEMAS` to query namespaces of MySQL.
   This PR also fix other issues below:
   
   - Release the docker tests in `MySQLNamespaceSuite.scala`.
   - Because MySQL doesn't support create comment of schema, let's throws 
`SQLFeatureNotSupportedException`.
   - Because MySQL doesn't support `DROP SCHEMA` in `RESTRICT` mode, let's 
throws `SQLFeatureNotSupportedException`.
   
   
   ### Why are the changes needed?
   MySQL dialect supports query namespaces.
   
   
   ### Does this PR introduce _any_ user-facing change?
   'Yes'.
   Some API changed.
   
   
   ### How was this patch tested?
   New tests.
   


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