Krisztian Kasa created HIVE-25590: ------------------------------------- Summary: Able to create views referencing temporary tables and materialized views Key: HIVE-25590 URL: https://issues.apache.org/jira/browse/HIVE-25590 Project: Hive Issue Type: Bug Components: Query Planning Reporter: Krisztian Kasa Assignee: Krisztian Kasa Fix For: 4.0.0
Creating views/materialized views referencing temporary tables and materialized views are disabled in Hive. However the verification algorithm fails to recognize temporary tables and materialized views in subqueries. The verification also fails when the view definition contains joins because CBO transforms join branches to subqueries. Example1: {code} create temporary table tmp1 (c1 string, c2 string); create view tmp1_view as select subq.c1 from (select c1, c2 from tmp1) subq; {code} Example2: {code} create table t1 (a int) stored as orc tblproperties ('transactional'='true'); create table t2 (a int) stored as orc tblproperties ('transactional'='true'); create materialized view mv1 as select a from t1 where a = 10; create materialized view mv2 as select t2.a from mv1 join t2 on (mv1.a = t2.a); {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)