Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ class V2SessionCatalog(catalog: SessionCatalog)
createTable(ident, CatalogV2Util.v2ColumnsToStructType(columns), partitions, properties)
}

override def purgeTable(ident: Identifier): Boolean = {
dropTableInternal(ident, purge = true)
}

// TODO: remove it when no tests calling this deprecated method.
override def createTable(
ident: Identifier,
Expand Down Expand Up @@ -202,6 +198,10 @@ class V2SessionCatalog(catalog: SessionCatalog)
loadTable(ident)
}

override def purgeTable(ident: Identifier): Boolean = {
dropTableInternal(ident, purge = true)
}

override def dropTable(ident: Identifier): Boolean = {
dropTableInternal(ident)
}
Expand All @@ -218,14 +218,16 @@ class V2SessionCatalog(catalog: SessionCatalog)
foundType = v1Table.tableType.name,
alternative = "DROP VIEW"
)
case null =>
false
case _ =>
catalog.invalidateCachedTable(ident.asTableIdentifier)
catalog.dropTable(
ident.asTableIdentifier,
ignoreIfNotExists = true,
purge = purge)
true
}
catalog.invalidateCachedTable(ident.asTableIdentifier)
catalog.dropTable(
ident.asTableIdentifier,
ignoreIfNotExists = true,
purge = purge)
true
} catch {
case _: NoSuchTableException =>
false
Expand Down