hive-issues mailing list archives

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


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:
>             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(
>         at org.apache.calcite.rel.RelVisitor.go(
>         at org.apache.hadoop.hive.ql.optimizer.calcite.translator.ASTConverter.convert(
>         at org.apache.hadoop.hive.ql.optimizer.calcite.translator.ASTConverter.convertSource(
>         at org.apache.hadoop.hive.ql.optimizer.calcite.translator.ASTConverter.convert(
> {code}

This message was sent by Atlassian JIRA

View raw message