@@ -485,8 +485,8 @@ class ResolveSessionCatalog(
485
485
replace,
486
486
viewType)
487
487
488
- case ShowTableProperties (SessionCatalogAndResolvedTable (resolved) , propertyKey) =>
489
- ShowTablePropertiesCommand (getTableIdentifier(resolved) , propertyKey)
488
+ case ShowTableProperties (r : ResolvedTable , propertyKey) if isSessionCatalog(r.catalog ) =>
489
+ ShowTablePropertiesCommand (r.identifier.asTableIdentifier , propertyKey)
490
490
491
491
case DescribeFunctionStatement (CatalogAndIdentifier (catalog, ident), extended) =>
492
492
val functionIdent =
@@ -581,16 +581,6 @@ class ResolveSessionCatalog(
581
581
}
582
582
}
583
583
584
- object SessionCatalogAndResolvedTable {
585
- def unapply (resolved : ResolvedTable ): Option [ResolvedTable ] = {
586
- if (isSessionCatalog(resolved.catalog)) {
587
- Some (resolved)
588
- } else {
589
- None
590
- }
591
- }
592
- }
593
-
594
584
object SessionCatalogAndNamespace {
595
585
def unapply (resolved : ResolvedNamespace ): Option [(SupportsNamespaces , Seq [String ])] =
596
586
if (isSessionCatalog(resolved.catalog)) {
@@ -600,11 +590,6 @@ class ResolveSessionCatalog(
600
590
}
601
591
}
602
592
603
- private def getTableIdentifier (resolved : ResolvedTable ): TableIdentifier = {
604
- assert(resolved.identifier.namespace.length < 2 )
605
- TableIdentifier (resolved.identifier.name, resolved.identifier.namespace.headOption)
606
- }
607
-
608
593
private def assertTopLevelColumn (colName : Seq [String ], command : String ): Unit = {
609
594
if (colName.length > 1 ) {
610
595
throw new AnalysisException (s " $command does not support nested column: ${colName.quoted}" )
0 commit comments