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-11151) Calcite transitive predicate inference rule should pay attention to its input rel type
Date Wed, 01 Jul 2015 11:06:04 GMT

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

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

[~ashutoshc], I have a question on the InputRefValidator and the _no need to add not null
filter for a constant_. Do you think the check should be added to HiveJoinAddNotNullRule too?
I think so... We can open a different issue for that, I just wanted to know what you think.

A couple of comments on the code:
- "isnotnull" string could be held in a _private static final_ variable in the class; I think
it will help us tracking easily the constants in the class (as in HiveJoinAddNotNullRule).
- To avoid cast to HepRelVertex (I'm guessing this might not be safe at some point in the
future) to get the children (lines 74-75), we can replace the super call in the constructor
by:
{code}
    super(operand(Join.class,
              operand(RelNode.class, any()),
              operand(RelNode.class, any())));
{code}
and then extract the operators by:
{code}
Join join = call.rel(0);
RelNode lChild = call.rel(1);
RelNode rChild = call.rel(2);
{code}

Otherwise, looks good to me.

> Calcite transitive predicate inference rule should pay attention to its input rel type
> --------------------------------------------------------------------------------------
>
>                 Key: HIVE-11151
>                 URL: https://issues.apache.org/jira/browse/HIVE-11151
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO, Logical Optimizer
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Ashutosh Chauhan
>            Assignee: Ashutosh Chauhan
>         Attachments: HIVE-11151.2.patch, HIVE-11151.3.patch, HIVE-11151.patch
>
>
> Calcite rule will add predicates even if types don't match



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

Mime
View raw message