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

Jesus Camacho Rodriguez edited comment on HIVE-22254 at 2/3/20 9:46 PM:
------------------------------------------------------------------------

It could... Though there may be two issues here: one is that the MV is not hit 
because we do not push the Aggregate through the Join (similar to HIVE-22262) 
and the other problem is the CBO crash (which I believe you are not seeing 
anymore, please confirm that it is not somehow hidden in the logs). If CBO is 
not crashing and Aggregate through Join will be tackled in HIVE-22262, we can 
close this one as duplicate and add the test as part of HIVE-22262.


was (Author: jcamachorodriguez):
It could... Though there may be two issues here: one is that the MV is not hit 
because we do not push the Aggregate through the Join (similar to HIVE-22262) 
and the other problem is the CBO crash (which I believe you are not seeing 
anymore). If CBO is not crashing and Aggregate through Join will be tackled in 
HIVE-22262, we can close this one as duplicate and add the test as part of 
HIVE-22262.

> Mappings.NoElementException: no target in mapping, in 
> `MaterializedViewAggregateRule
> ------------------------------------------------------------------------------------
>
>                 Key: HIVE-22254
>                 URL: https://issues.apache.org/jira/browse/HIVE-22254
>             Project: Hive
>          Issue Type: Sub-task
>          Components: CBO, Materialized views
>    Affects Versions: 3.1.2
>            Reporter: Steve Carlin
>            Priority: Minor
>         Attachments: ojoin_full.sql
>
>
> A Mappings.NoElementException happens on an edge condition for a query using 
> a materialized view.
> The query contains a "group by" clause which contains fields from both sides 
> of a join.  There is no real reason to group by this same field twice, but 
> there is also no reason that this shouldn't succeed.
> Attached is a script which causes this failure.  The query causing the 
> problem looks like this:
> explain extended select sum(1)
> from fact inner join dim1
> on fact.f1 = dim1.pk1
> group by f1, pk1;



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

Reply via email to