hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesus Camacho Rodriguez (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-11152) Swapping join inputs in ASTConverter
Date Wed, 01 Jul 2015 11:21:04 GMT

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

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

[~jpullokkaran], I'm not sure that's the way to go. 

The problem that I see is that if we do it over the Calcite plan (on or even after PlanConverter),
and we swap the inputs of the joins accordingly, we would need to add Project operators on
top of the Join operators to keep the plan correct, thus defeating the main purpose of this
change: that the multijoin optimization kicks in. Otherwise we need to run a whole set of
rules again, but we may be interfering with what the PlanConverter already did.
In turn, I do not think it is possible to "just" swap inputs in Calcite, which relies on the
positions of the fields; this may cause another set of problems as the upper part of the plan
relies on this positions.

Thus, I think it makes sense to add it in ASTConverter. AST relies fully on column names and
not positions, so if the inputs are swapped, nothing will happen in the upper part of the
plan.

--

I checked the fails, and they are either benign or even some improvements (e.g. correlationoptimizer6.q).
I'm uploading a new patch adding the comment to plan modifier you requested, as well as the
new q files.

> Swapping join inputs in ASTConverter
> ------------------------------------
>
>                 Key: HIVE-11152
>                 URL: https://issues.apache.org/jira/browse/HIVE-11152
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>         Attachments: HIVE-11152.patch
>
>
> We want that multijoin optimization in SemanticAnalyzer always kicks in when CBO is enabled
(if possible). For that, we may need to swap the join inputs when we return from CBO through
the Hive AST.



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

Mime
View raw message