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

Stamatis Zampetakis commented on HIVE-29506:
--------------------------------------------

[~krisztiankasa] It would be helpful to include the failure stacktrace in the 
Jira cause as it is its not clear at which point the error occurs. Moreover, if 
the same problem appears in the future with different queries having the 
stacktrace would beĀ  helpful to identify if it is the same problem or not.

> HiveRelDecorrelator fails to decorrelate plan with Values operator
> ------------------------------------------------------------------
>
>                 Key: HIVE-29506
>                 URL: https://issues.apache.org/jira/browse/HIVE-29506
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO
>            Reporter: Krisztian Kasa
>            Priority: Major
>              Labels: pull-request-available
>
> Repro steps
> {code}
> set hive.support.concurrency=true;
> set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
> -- To create a HiveValues operator before decorrelation automatic query 
> rewrite with
> -- materialized views is used.
> -- All tables must be transactional to trigger automatic query rewrite.
> create table mv_source (any_col int) stored as orc TBLPROPERTIES 
> ('transactional'='true');
> create table t1 (a int, b int) stored as orc TBLPROPERTIES 
> ('transactional'='true');
> create table t2 (a int, b int) stored as orc TBLPROPERTIES 
> ('transactional'='true');
> -- At least one materialized view must exist.
> create materialized view any_mv as
> select any_col from mv_source where any_col > 20;
> -- Automatic query rewrite traverses the plan and recreates the HiveFilter 
> using RelBuilder.
> -- If the condition is always false, it replaces the filter with HiveValues.
> explain cbo
> select * from t1 where 1 = 2
> union
> select * from t1
> where exists (select a from t2 where t1.a > 10)
> ;
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to