File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/util Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -163,16 +163,17 @@ object SparkCatalogUtils extends Logging {
163163 val namespaces = listNamespacesWithPattern(catalog, schemaPattern)
164164 catalog match {
165165 case builtin if builtin.name() == SESSION_CATALOG =>
166- val catalog = spark.sessionState.catalog
167- val databases = catalog .listDatabases(schemaPattern)
166+ val sessionCatalog = spark.sessionState.catalog
167+ val databases = sessionCatalog .listDatabases(schemaPattern)
168168
169169 def isMatchedTableType (tableTypes : Set [String ], tableType : String ): Boolean = {
170170 val typ = if (tableType.equalsIgnoreCase(VIEW )) VIEW else TABLE
171171 tableTypes.exists(typ.equalsIgnoreCase)
172172 }
173173
174174 databases.flatMap { db =>
175- val identifiers = catalog.listTables(db, tablePattern, includeLocalTempViews = false )
175+ val identifiers =
176+ sessionCatalog.listTables(db, tablePattern, includeLocalTempViews = false )
176177 if (ignoreTableProperties) {
177178 identifiers.map {
178179 case TableIdentifier (
@@ -192,7 +193,7 @@ object SparkCatalogUtils extends Logging {
192193 null )
193194 }
194195 } else {
195- catalog .getTablesByName(identifiers)
196+ sessionCatalog .getTablesByName(identifiers)
196197 .filter(t => isMatchedTableType(tableTypes, t.tableType.name)).map { t =>
197198 val typ = if (t.tableType.name == VIEW ) VIEW else TABLE
198199 Row (
You can’t perform that action at this time.
0 commit comments