[ 
https://issues.apache.org/jira/browse/SPARK-27266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dongjoon Hyun updated SPARK-27266:
----------------------------------
    Affects Version/s:     (was: 2.4.0)
                       3.0.0

> Support ANALYZE TABLE to collect tables stats for cached catalog views
> ----------------------------------------------------------------------
>
>                 Key: SPARK-27266
>                 URL: https://issues.apache.org/jira/browse/SPARK-27266
>             Project: Spark
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Takeshi Yamamuro
>            Priority: Major
>
> The master doesn't support ANALYZE TABLE to collect tables stats for catalog 
> views even if they are cached;
> {code:java}
> scala> sql(s"CREATE VIEW v AS SELECT 1 c")
> scala> sql(s"CACHE LAZY TABLE v")
> scala> sql(s"ANALYZE TABLE v COMPUTE STATISTICS")
> org.apache.spark.sql.AnalysisException: ANALYZE TABLE is not supported on 
> views.;
>   at 
> org.apache.spark.sql.execution.command.AnalyzeTableCommand.run(AnalyzeTableCommand.scala:38)
>   at 
> org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70)
>   at 
> org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:68)
>   at 
> org.apache.spark.sql.execution.command.ExecutedCommandExec.executeCollect(commands.scala:79){code}
> Since SPARK-25196 has supported an ANALYZE command to collect column 
> statistics for cached catalog view, we could support table stats, too.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to