You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Jesus Camacho Rodriguez (Jira)" <ji...@apache.org> on 2019/09/27 23:20:00 UTC

[jira] [Updated] (HIVE-22258) Rewriting fails for `IN` clauses in MV and query when we use equals or subset in the query

     [ 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)