Details
-
Improvement
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Implement virtual views with rewriting enabled, useful to check whether a certain rewriting will be triggered. These view 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.
set hive.simulation.enable=true;
create view mv1_n2 enable rewrite 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 view mv1_n2;