[
https://issues.apache.org/jira/browse/HIVE-18394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jesus Camacho Rodriguez updated HIVE-18394:
-------------------------------------------
Resolution: Fixed
Fix Version/s: 4.0.0
3.1.0
Status: Resolved (was: Patch Available)
Pushed to master, branch-3.
Cc [~vgarg]
> Materialized view: "Create Materialized View" should default to rewritable
> ones
> -------------------------------------------------------------------------------
>
> Key: HIVE-18394
> URL: https://issues.apache.org/jira/browse/HIVE-18394
> Project: Hive
> Issue Type: Improvement
> Components: Materialized views
> Reporter: Gopal V
> Assignee: Jesus Camacho Rodriguez
> Priority: Blocker
> Labels: TODOC3.0
> Fix For: 3.1.0, 4.0.0
>
> Attachments: HIVE-18394.01.patch, HIVE-18394.02.patch,
> HIVE-18394.03.patch, HIVE-18394.patch
>
>
> This is a usability ticket, since it is possible to end up creating
> materialized views and realize that they need an additional flag to be picked
> up by the optimizer to do rewrites to.
> {code:sql}
> create materialized view ca as select * from customer, customer_address where
> c_current_addr_sk = ca_address_sk;
> set hive.materializedview.rewriting=true;
> select count(1) from customer, customer_address where c_current_addr_sk =
> ca_address_sk; -- does not use materialized view
> {code}
> Needs another step
> {code:sql}
> alter materialized view ca enable rewrite;
> {code}
> And then, it kicks in
> {code:sql}
> select count(1) from customer, customer_address where c_current_addr_sk =
> ca_address_sk;
> OK
> 12000000
> Time taken: 0.494 seconds, Fetched: 1 row(s)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)