maropu commented on a change in pull request #24200: [SPARK-27266][SQL] Support 
ANALYZE TABLE to collect tables stats for cached catalog views
URL: https://github.com/apache/spark/pull/24200#discussion_r269344427
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/AnalyzeTableCommand.scala
 ##########
 @@ -39,8 +39,10 @@ case class AnalyzeTableCommand(
       val table = sparkSession.table(tableIdent.quotedString)
       val cacheManager = sparkSession.sharedState.cacheManager
       if (cacheManager.lookupCachedData(table.logicalPlan).isDefined) {
-        // To collect table stats, materializes an underlying columnar RDD
-        table.collect()
+        if (!noscan) {
+          // To collect table stats, materializes an underlying columnar RDD
+          table.collect()
 
 Review comment:
   oh! I missed it... this is my silly mistake, sorry.

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


With regards,
Apache Git Services

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

Reply via email to