konwu created SPARK-45775:
-----------------------------
Summary: Drop table skiped when CatalogV2Util loadTable meet
unexpected Exception
Key: SPARK-45775
URL: https://issues.apache.org/jira/browse/SPARK-45775
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 3.1.3
Environment: spark 3.1.3
Reporter: konwu
Currently CatalogV2Util.loadTable method catch only NoSuch*Exception like below
{code:java}
def loadTable(catalog: CatalogPlugin, ident: Identifier): Option[Table] =
try {
Option(catalog.asTableCatalog.loadTable(ident))
} catch {
case _: NoSuchTableException => None
case _: NoSuchDatabaseException => None
case _: NoSuchNamespaceException => None
} {code}
It will skip drop table when conmunicate with meta time out or other Exception,
because the method always return None, maybe we should catch it like below
{code:java}
def loadTable(catalog: CatalogPlugin, ident: Identifier): Option[Table] =
try {
Option(catalog.asTableCatalog.loadTable(ident))
} catch {
case e: NoSuchTableException => return None
case e: NoSuchDatabaseException => return None
case e: NoSuchNamespaceException => return None
case e: Throwable => throw e
} {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]