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 2019/10/15 22:52:18 UTC

[GitHub] [spark] imback82 commented on a change in pull request #26129: [SPARK-29482][SQL] ANALYZE TABLE should look up catalog/table like v2 commands

imback82 commented on a change in pull request #26129: [SPARK-29482][SQL] ANALYZE TABLE should look up catalog/table like v2 commands
URL: https://github.com/apache/spark/pull/26129#discussion_r335211160
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
 ##########
 @@ -265,6 +265,24 @@ class ResolveSessionCatalog(
     // TODO (SPARK-29014): we should check if the current catalog is session catalog here.
     case ShowTablesStatement(None, pattern) if defaultCatalog.isEmpty =>
       ShowTablesCommand(None, pattern)
+
+    case AnalyzeTableStatement(tableName, partitionSpec, noScan) =>
+      val CatalogAndIdentifierParts(catalog, parts) = tableName
+      if (!isSessionCatalog(catalog)) {
+        throw new AnalysisException("ANALYZE TABLE is only supported with v1 tables.")
+      }
 
 Review comment:
   Do you need to check `if (nameParts.length != 1)` simliar to `ShowTablesStatement` above (line 259) if this is session catalog?

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