Details
-
Improvement
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
None
Description
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.
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
Needs another step
alter materialized view ca enable rewrite;
And then, it kicks in
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)