gatorsmile commented on a change in pull request #24741: [SPARK-27322][SQL]
DataSourceV2: Select from multiple catalogs
URL: https://github.com/apache/spark/pull/24741#discussion_r290530241
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -728,20 +737,16 @@ class Analyzer(
// and the default database is only used to look up a view);
// 3. Use the currentDb of the SessionCatalog.
private def lookupTableFromCatalog(
+ tableIdentifier: TableIdentifier,
u: UnresolvedRelation,
defaultDatabase: Option[String] = None): LogicalPlan = {
- val tableIdentWithDb = u.tableIdentifier.copy(
- database = u.tableIdentifier.database.orElse(defaultDatabase))
+ val tableIdentWithDb = tableIdentifier.copy(
+ database = tableIdentifier.database.orElse(defaultDatabase))
try {
catalog.lookupRelation(tableIdentWithDb)
} catch {
- case e: NoSuchTableException =>
- u.failAnalysis(s"Table or view not found:
${tableIdentWithDb.unquotedString}", e)
- // If the database is defined and that database is not found, throw an
AnalysisException.
- // Note that if the database is not defined, it is possible we are
looking up a temp view.
- case e: NoSuchDatabaseException =>
- u.failAnalysis(s"Table or view not found:
${tableIdentWithDb.unquotedString}, the " +
- s"database ${e.db} doesn't exist.", e)
Review comment:
The original error messages are still helpful. Let us keep it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]