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-14957) HiveSortLimitPullUpConstantsRule misses branches when parent operator is Union
Date Fri, 14 Oct 2016 21:46:20 GMT

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

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

[~pxiong], took a look at the new patch, thanks! Just a small change: I think you should include
the child operators in the same order as they were for the original parent operator.

{code}
for (RelNode child : parent.getInputs()) {
  if (((HepRelVertex) child).getCurrentRel().equals(sort)) {
    inputs.add(relBuilder.build());
  } else {
    inputs.add(child);
  }
}
{code}

This is important for operators for which the order of the children matters e.g. joins.

> HiveSortLimitPullUpConstantsRule misses branches when parent operator is Union
> ------------------------------------------------------------------------------
>
>                 Key: HIVE-14957
>                 URL: https://issues.apache.org/jira/browse/HIVE-14957
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Pengcheng Xiong
>            Assignee: Pengcheng Xiong
>         Attachments: HIVE-14957.01.patch, HIVE-14957.02.patch
>
>
> {code}
> call.transformTo(parent.copy(parent.getTraitSet(), ImmutableList.of(relBuilder.build())));
> {code}
> When parent is an union operator which has 2 inputs, the parent.copy will only copy the
one that has SortLimit and ignore the other branches.



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

Mime
View raw message