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] [Comment Edited] (HIVE-16775) Fix HiveFilterAggregateTransposeRule when filter is always false
Date Thu, 01 Jun 2017 16:07:04 GMT

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

Jesus Camacho Rodriguez edited comment on HIVE-16775 at 6/1/17 4:06 PM:
------------------------------------------------------------------------

[~pxiong], [~ashutoshc], when we create a filter with a {{false}} predicate from the {{relBuilder}},
we should be calling {{empty}} method.

We had the same problem in the past so {{empty}} has been overridden in Hive own version of
relBuilder:
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelBuilder.java#L103
Thus we should not see this problem anymore.

I think we are not using the right constructor where we pass the Hive builder to the rule,
that is why we are generating a {{values}} operator. Changing the Hive rule to use this one
might fix the issue:
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rel/rules/FilterAggregateTransposeRule.java#L64

In general, it would be good to replace calls to any deprecated Calcite method from Hive,
this seems to be causing a couple of issues, e.g., with metadata providers.


was (Author: jcamachorodriguez):
[~pxiong], [~ashutoshc], when we create a filter with a {{false}} predicate from the {{relBuilder}},
we should be calling {{empty}} method.

We had the same problem in the past so {{empty}} has been overridden in Hive own version of
relBuilder:
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelBuilder.java#L103
Thus we should not see this problem anymore.

Why are we generating a {{values}} operator? I think we are not using the right constructor
where we pass the Hive builder to the rule, changing the Hive rule to use this one might fix
the issue:
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rel/rules/FilterAggregateTransposeRule.java#L64

In general, it would be good to replace calls to any deprecated Calcite method from Hive,
this seems to be causing a couple of issues, e.g., with metadata providers.

> Fix HiveFilterAggregateTransposeRule when filter is always false
> ----------------------------------------------------------------
>
>                 Key: HIVE-16775
>                 URL: https://issues.apache.org/jira/browse/HIVE-16775
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Pengcheng Xiong
>            Assignee: Pengcheng Xiong
>         Attachments: HIVE-16775.01.patch, HIVE-16775.02.patch
>
>
> query4.q,query74.q
> {code}
> [7e490527-156a-48c7-aa87-8c80093cdfa8 main] ql.Driver: FAILED: NullPointerException null
> java.lang.NullPointerException
>         at org.apache.hadoop.hive.ql.optimizer.calcite.translator.ASTConverter$QBVisitor.visit(ASTConverter.java:457)
>         at org.apache.calcite.rel.RelVisitor.go(RelVisitor.java:61)
>         at org.apache.hadoop.hive.ql.optimizer.calcite.translator.ASTConverter.convert(ASTConverter.java:110)
>         at org.apache.hadoop.hive.ql.optimizer.calcite.translator.ASTConverter.convertSource(ASTConverter.java:393)
>         at org.apache.hadoop.hive.ql.optimizer.calcite.translator.ASTConverter.convert(ASTConverter.java:115)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message