dchvn commented on a change in pull request #34667:
URL: https://github.com/apache/spark/pull/34667#discussion_r760805798



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
##########
@@ -323,18 +323,25 @@ final class DataFrameWriter[T] private[sql](ds: 
Dataset[T]) {
           provider match {
             case supportsExtract: SupportsCatalogOptions =>
               val ident = supportsExtract.extractIdentifier(dsOptions)
-              val catalog = CatalogV2Util.getTableProviderCatalog(

Review comment:
       `CatalogV2Util.getTableProviderCatalog.name` will return `spark_catalog` 
when we save default catalog, that is cause of failed test 
`SupportsCatalogOptionsSuite`. 
   ```scala
     test(s"save works with ErrorIfExists - no table, no partitioning, session 
catalog") {
       testCreateAndRead(SaveMode.ErrorIfExists, None, Nil)
     }
   ```
   which we need here is `default` namespace got from `ident.namespaces`. It 
can satisfy the test.
   




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