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 2016/03/01 19:00:22 UTC

[jira] [Commented] (HIVE-13069) Enable cartesian product merging

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

Jesus Camacho Rodriguez commented on HIVE-13069:
------------------------------------------------

[~ashutoshc], that was my first idea indeed: to ensure leftAlias is not null. However, leftAlias in QBJoinTree is only set if there is a join condition.

In fact, I have been checking the code again, and I think it is safe to merge checking that 1) leftAlias is null, and 2) the number of conditions in node and target node are the same i.e. zero.

I am uploading a new patch that will add new test cases.

> Enable cartesian product merging
> --------------------------------
>
>                 Key: HIVE-13069
>                 URL: https://issues.apache.org/jira/browse/HIVE-13069
>             Project: Hive
>          Issue Type: Improvement
>          Components: Parser
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>         Attachments: HIVE-13069.patch
>
>
> Currently we can merge 2-way joins into n-way joins when the joins are executed over the same column.
> In turn, CBO might produce plans containing cartesian products if the join columns are constant values; after HIVE-12543 went in, this is rather common, as those constant columns are correctly pruned. However, currently we do not merge a cartesian product with two inputs into a cartesian product with multiple inputs, which could result in performance loss.



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