hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-16775) Skip HiveFilterAggregateTransposeRule when filter is always false
Date Wed, 31 May 2017 15:24:04 GMT

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

Ashutosh Chauhan commented on HIVE-16775:
-----------------------------------------

While I agree throwing exception and failing query is bad, but we will miss a huge optimization
opportunity if we don't push always false filter past aggregate. Imagine doing billion row
Gby and throwing that immediately away since there is a false filter immediately after. We
ought to do better. 
There are 2 options as I see: a) Override Calcite rule and don't generate values clause in
rule. Perhaps, replace with select operator.
b) We already have values clause in our grammar, so on AST we can generate values token with
empty set. Then during genPlan() we can genTablePlan(DUMMY_TABLE, qb) for values.

> Skip 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
>
>
> 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