[
https://issues.apache.org/jira/browse/HIVE-18163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16269240#comment-16269240
]
Jesus Camacho Rodriguez edited comment on HIVE-18163 at 11/28/17 6:51 PM:
--------------------------------------------------------------------------
[~kgyrtkirk], thanks for the patch.
Could we follow a different approach: would it be possible to put the view in
the materialized view registry after StatsTask has run?
The problem with the approach in the patch is that we will load the
materialized views in the cache at query planning time (when we call
_getRewritingMaterializedViews_): we do not want to do that as it will put an
additional burden on compilation time for queries (loading the query into the
cache in fact parses the query, creates the Calcite logical plan, etc.).
was (Author: jcamachorodriguez):
[~kgyrtkirk], thanks for the patch.
Could we follow a different approach: would it be possible to put the view in
the materialized view registry after StatsTask has run?
The problem with the approach in the patch is that we will load the
materialized views in the cache at query planning time (when we call
_getRewritingMaterializedViews_): we do not want to do that as it will put an
additional burden on compilation time for queries (loading the query into the
cache in fact parses the query, creates the Calcite logical plan, etc.). The
assumption is that it is acceptable that the MV is not available immediately
after creation for query rewriting.
> 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)