You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2018/05/11 17:50:00 UTC

[jira] [Commented] (HIVE-18394) Materialized view: "Create Materialized View" should default to rewritable ones

    [ https://issues.apache.org/jira/browse/HIVE-18394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472347#comment-16472347 ] 

Jesus Camacho Rodriguez commented on HIVE-18394:
------------------------------------------------

[~gopalv], could you review the patch? Thanks

> 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
>         Attachments: 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)