Github user KanakaKumar commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2791#discussion_r222594726
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala
---
@@ -208,7 +209,10 @@ class CarbonFileMetastore extends CarbonMetaStore {
try {
lookupRelation(tableIdentifier)(sparkSession)
} catch {
- case _: Exception =>
+ case ex: Exception =>
+ if (ex.getCause.isInstanceOf[HiveException]) {
+ throw ex
+ }
--- End diff --
There are exceptions from different hierarchy incase of table not found,
not all are HiveException.
Ex:- NoSuchTableException extends AnalysisException, InvalidTableException
extends HiveException.
So, I think we can refer the exceptions from Spark Code related to table
not exists, not found and return false for only those exception cases. All
other exceptions we can throw back to caller.
---