You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (JIRA)" <ji...@apache.org> on 2019/04/01 00:26:00 UTC

[jira] [Resolved] (SPARK-27266) Support ANALYZE TABLE to collect tables stats for cached catalog views

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

Dongjoon Hyun resolved SPARK-27266.
-----------------------------------
       Resolution: Fixed
         Assignee: Takeshi Yamamuro
    Fix Version/s: 3.0.0

This is resolved via https://github.com/apache/spark/pull/24200

> 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
>            Assignee: Takeshi Yamamuro
>            Priority: Major
>             Fix For: 3.0.0
>
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org