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:21:00 UTC

[jira] [Updated] (HIVE-22263) MV has distinct on columns and query has count(distinct) on one of the columns, we do not trigger rewritin

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

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

> MV has distinct on columns and query has count(distinct) on one of the columns, we do not trigger rewritin
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-22263
>                 URL: https://issues.apache.org/jira/browse/HIVE-22263
>             Project: Hive
>          Issue Type: Sub-task
>          Components: CBO, Materialized views
>    Affects Versions: 3.1.2
>            Reporter: Steve Carlin
>            Priority: Major
>         Attachments: count-distinct.sql, count-distinct2.sql
>
>
> Count distinct issues with materialized views.  Two scripts attached
> 1) 
> create materialized view base_aview stored as orc as select distinct c1 c1, c2 c2 from base;
> explain extended select count(distinct c1) from base group by c2 ;
> 2)
> create materialized view base_aview stored as orc as SELECT c1 c1, c2 c2, sum(c2) FROM base group by 1,2;
> explain extended select count(distinct c1) from base group by c2;



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