You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/09 14:11:17 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #37415: [DO NOT MERGE]

cloud-fan commented on code in PR #37415:
URL: https://github.com/apache/spark/pull/37415#discussion_r941392655


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala:
##########
@@ -345,9 +372,9 @@ class SessionCatalog(
       throw QueryCompilationErrors.createExternalTableWithoutLocationError
     }
 
-    val db = formatDatabaseName(tableDefinition.identifier.database.getOrElse(getCurrentDatabase))
-    val table = formatTableName(tableDefinition.identifier.table)
-    val tableIdentifier = attachSessionCatalog(TableIdentifier(table, Some(db)))
+    val qualifiedIdent = qualifyIdentifier(tableDefinition.identifier)
+    val db = qualifiedIdent.database.get
+    val table = qualifiedIdent.table

Review Comment:
   Most of the changes in this file are similar to this: Previously we get the current database and format the names to build a `TableIdentifier`. Now we qualify the input identifier and get table/database name from the qualified identifier.



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org