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

Zoltan Haindrich updated HIVE-18163:
------------------------------------
    Attachment: HIVE-18163.01.patch

#1)

* collect stats for {{create materialized view}} as well; AFAIK its not 
possible to do an update on a materialized view ; so every materialized view 
operation can be considered as a rewrite w.r.t stats
* added a small collection to delay the construction of the view objects in 
{{MaterializedViewRegistry}}; the reason this was needed is:
** {{StatsTask}} runs after {{DDLTask}} :
*** {{DDLTask}} invoked  {{MaterializedViewRegistry}} to put the view in cache
*** {{StatsTask}} filled out the basicStats info in the metastore...
*** next query used the *out-dated* cached table object (which was available at 
the time {{MaterializedViewRegistry}} built the scanner.
* I've rerun all the "materialized_view" tests. and the results look good to me
* in materialized_view_create_rewrite_2.q.out the usage of {{cmv_mat_view_5}} 
appeared; which looks good to me

[~jcamachorodriguez] could you take a look?

> Stats: create materialized view should also collect stats
> ---------------------------------------------------------
>
>                 Key: HIVE-18163
>                 URL: https://issues.apache.org/jira/browse/HIVE-18163
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Statistics
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>         Attachments: HIVE-18163.01.patch
>
>
> not having basic stats on the materialized view may cause it to be "ruled 
> out" as a viable alternative by the cbo.
> repro set {{set hive.stats.deserialization.factor=10.0}} in 
> {{ql/src/test/queries/clientpositive/materialized_view_create_rewrite.q}}
> blocks: HIVE-18149



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to