Skip to content

Commit

Permalink
make simple
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses-you committed Nov 7, 2019
1 parent b65c62d commit 85bcb98
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import org.apache.spark.sql.catalyst.plans.PlanTest
import org.apache.spark.sql.catalyst.plans.PlanTestBase
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.catalyst.util._
import org.apache.spark.sql.connector.catalog.SupportsNamespaces
import org.apache.spark.sql.execution.FilterExec
import org.apache.spark.sql.execution.datasources.DataSourceUtils
import org.apache.spark.sql.internal.SQLConf
Expand Down Expand Up @@ -373,16 +372,6 @@ private[sql] trait SQLTestUtilsBase
namespaces.foreach { name =>
spark.sql(s"DROP NAMESPACE IF EXISTS $name CASCADE")
}
import org.apache.spark.sql.connector.catalog.CatalogV2Implicits._
spark.sessionState.catalogManager.currentCatalog match {
case supportNamespace: SupportsNamespaces =>
supportNamespace.asNamespaceCatalog.defaultNamespace() match {
case Array(name) => spark.sql(s"USE $name")
case Array(name, _*) => spark.sql(s"USE $name")
case _ => spark.sql("USE default")
}
case _ => spark.sql(s"USE $DEFAULT_DATABASE")
}
}
}

Expand Down

0 comments on commit 85bcb98

Please sign in to comment.