Jesus Camacho Rodriguez created HIVE-21133:
----------------------------------------------

             Summary: Add simulated materialized views useful for rewriting 
debugging
                 Key: HIVE-21133
                 URL: https://issues.apache.org/jira/browse/HIVE-21133
             Project: Hive
          Issue Type: Improvement
          Components: Materialized views
            Reporter: Jesus Camacho Rodriguez
            Assignee: Jesus Camacho Rodriguez


Implement simulated materialized views, useful to check whether a certain 
rewriting will be triggered. Simulated materialized views definitions will be 
stored in the user session, and they will only be used when simulation mode is 
enabled and user runs {{explain cbo}} / {{explain cbo extended}}.

{code}
set hive.simulation.enable=true;

create simulated materialized view mv1_n2 as
select * from emps_n3 where empid < 150;

explain cbo
select *
from (select * from emps_n3 where empid < 120) t
join depts_n2 using (deptno);

drop simulated materialized view mv1_n2;
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to