roczei commented on PR #37679:
URL: https://github.com/apache/spark/pull/37679#issuecomment-1242406713

   > we should also update `V2SessionCatalog.defaultNamespace`
   
   @cloud-fan, for example this change will be good?
   
   ```
   diff --git 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalog.scala
 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalog.scala
   index efbc9dd755..23775c3ae0 100644
   --- 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalog.scala
   +++ 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalog.scala
   @@ -33,6 +33,7 @@ import org.apache.spark.sql.connector.expressions.Transform
    import org.apache.spark.sql.errors.{QueryCompilationErrors, 
QueryExecutionErrors}
    import org.apache.spark.sql.execution.datasources.DataSource
    import org.apache.spark.sql.internal.connector.V1Function
   +import org.apache.spark.sql.internal.SQLConf
    import org.apache.spark.sql.types.StructType
    import org.apache.spark.sql.util.CaseInsensitiveStringMap
    
   @@ -43,7 +44,7 @@ class V2SessionCatalog(catalog: SessionCatalog)
      extends TableCatalog with FunctionCatalog with SupportsNamespaces with 
SQLConfHelper {
      import V2SessionCatalog._
    
   -  override val defaultNamespace: Array[String] = Array("default")
   +  override val defaultNamespace: Array[String] = 
Array(SQLConf.get.defaultDatabase)
   ```


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