spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] cloud-fan commented on a change in pull request #27718: [SPARK-30885][SQL][FOLLOW-UP] Fix issues where some V1 commands allow tables that are not fully qualified.
Date Mon, 02 Mar 2020 06:23:18 GMT
cloud-fan commented on a change in pull request #27718: [SPARK-30885][SQL][FOLLOW-UP] Fix issues
where some V1 commands allow tables that are not fully qualified.
URL: https://github.com/apache/spark/pull/27718#discussion_r386214168
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
 ##########
 @@ -655,6 +655,9 @@ class ResolveSessionCatalog(
   object SessionCatalogAndTable {
     def unapply(nameParts: Seq[String]): Option[(CatalogPlugin, Seq[String])] = nameParts
match {
       case SessionCatalogAndIdentifier(catalog, ident) =>
+        if (ident.namespace.isEmpty) {
+          throw new AnalysisException(s"Table not found: ${nameParts.quoted}")
 
 Review comment:
   nit: maybe we can check more
   ```
   if (ident.namespace.length != 1) {
     fail("The namespace of tables in the session catalog must have one and only one name
part.")
   }
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


Mime
View raw message