hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-8280) CBO : When filter is applied on dimension table PK/FK code path is not in effect.
Date Wed, 08 Oct 2014 08:20:34 GMT

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

Hive QA commented on HIVE-8280:
-------------------------------



{color:green}Overall{color}: +1 all checks pass

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12673524/HIVE-8280.3.patch

{color:green}SUCCESS:{color} +1 6528 tests passed

Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/1149/testReport
Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/1149/console
Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-1149/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12673524

> CBO : When filter is applied on dimension table PK/FK code path is not in effect.
> ---------------------------------------------------------------------------------
>
>                 Key: HIVE-8280
>                 URL: https://issues.apache.org/jira/browse/HIVE-8280
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO
>    Affects Versions: 0.14.0
>            Reporter: Mostafa Mokhtar
>            Assignee: Harish Butani
>             Fix For: 0.14.0
>
>         Attachments: HIVE-8280.1.patch, HIVE-8280.2.patch, HIVE-8280.3.patch
>
>
> When a filter is applied on PK side joins don't qualify as PK/FK join.
> In getUniqueKeys when a filter is applied on the table the child is no  longer a table
scan.
> {code}
>   public Set<BitSet> getUniqueKeys(ProjectRelBase rel, boolean ignoreNulls) {
>     RelNode child = rel.getChild();
>     if (!(child instanceof HiveTableScanRel)) {
>       Function<RelNode, Metadata> fn = RelMdUniqueKeys.SOURCE.apply(
>           rel.getClass(), BuiltInMetadata.UniqueKeys.class);
>       return ((BuiltInMetadata.UniqueKeys) fn.apply(rel))
>           .getUniqueKeys(ignoreNulls);
>     } 
> {code}
> Repro 
> {code}
> with ss as 
> (select 
>     ss_customer_sk, ss_item_sk, ss_ticket_number
> from
>     store_sales,
>     store
> where
>     s_store_sk = ss_store_sk
>         and s_market_id = 4), 
> sr as
> (select sr_customer_sk,sr_item_sk ,sr_ticket_number from store_returns, store where s_store_sk
= sr_store_sk and s_market_id=4) 
> select 
>     count(*)
> from
>     ss,
>     sr
> where
>     ss_customer_sk = sr_customer_sk
>         and ss_item_sk = sr_item_sk
>         and ss_ticket_number = sr_ticket_number;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message