[ 
https://issues.apache.org/jira/browse/HIVE-22258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jesus Camacho Rodriguez updated HIVE-22258:
-------------------------------------------
    Component/s: Materialized views

> Rewriting fails for `IN` clauses in MV and query when we use equals or subset 
> in the query
> ------------------------------------------------------------------------------------------
>
>                 Key: HIVE-22258
>                 URL: https://issues.apache.org/jira/browse/HIVE-22258
>             Project: Hive
>          Issue Type: Sub-task
>          Components: CBO, Materialized views
>    Affects Versions: 3.1.2
>            Reporter: Steve Carlin
>            Priority: Major
>         Attachments: in-pred.sql
>
>
> ...as stated in title.  Script is attached.  The issue can be seen with these 
> queries:
>  
> create materialized view av1 stored as orc as select state, year, 
> sum(population) from census_pop where year IN (2010, 2018) group by state, 
> year;
> -- this is ok
> explain extended select state, year, sum(population) from census_pop where 
> year IN (2010, 2018) group by state, year;
> -- this is not ok
> explain extended select state, year, sum(population) from census_pop where 
> year = 2010 group by state, year;
> -- this is not ok
> explain extended select state, year, sum(population) from census_pop where 
> year in (2010) group by state, year;



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to