[jira] [Resolved] (SPARK-45775) Drop table skiped when CatalogV2Util loadTable meet unexpected Exception

2023-11-06 Thread konwu (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-45775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

konwu resolved SPARK-45775.
---
Resolution: Invalid

> 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
>Priority: Major
>
> 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: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Created] (SPARK-45775) Drop table skiped when CatalogV2Util loadTable meet unexpected Exception

2023-11-02 Thread konwu (Jira)
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: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org