You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Jesus Camacho Rodriguez (Jira)" <ji...@apache.org> on 2021/03/22 02:24:00 UTC

[jira] [Assigned] (HIVE-24638) Redundant filter in scalar subquery

     [ https://issues.apache.org/jira/browse/HIVE-24638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesus Camacho Rodriguez reassigned HIVE-24638:
----------------------------------------------

    Assignee: Soumyakanti Das  (was: Vineet Garg)

> Redundant filter in scalar subquery 
> ------------------------------------
>
>                 Key: HIVE-24638
>                 URL: https://issues.apache.org/jira/browse/HIVE-24638
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Mustafa İman
>            Assignee: Soumyakanti Das
>            Priority: Major
>
> Look at the query and CBO plan in https://issues.apache.org/jira/browse/HIVE-24595 .
> Note that there is a filter to guarantee that subquery returns only one row: "HiveFilter(condition=[<=(sq_count_check($0), 1)])" . This condition is redundant as either sq_count_check fails in runtime or condition is true for all rows.
> Look at the stacktrace
> {code:java}
>  at org.apache.hadoop.hive.ql.udf.generic.GenericUDFSQCountCheck.evaluate(GenericUDFSQCountCheck.java:70) at org.apache.hadoop.hive.ql.udf.generic.GenericUDFSQCountCheck.evaluate(GenericUDFSQCountCheck.java:70) at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator._evaluate(ExprNodeGenericFuncEvaluator.java:197) at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluator.evaluate(ExprNodeEvaluator.java:80) at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator$DeferredExprObject.get(ExprNodeGenericFuncEvaluator.java:88) at org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqualOrLessThan.evaluate(GenericUDFOPEqualOrLessThan.java:111) at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator._evaluate(ExprNodeGenericFuncEvaluator.java:197) at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluator.evaluate(ExprNodeEvaluator.java:80) at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluator.evaluate(ExprNodeEvaluator.java:68) at org.apache.hadoop.hive.ql.exec.FilterOperator.process(FilterOperator.java:113) at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:888) at org.apache.hadoop.hive.ql.exec.GroupByOperator.forward(GroupByOperator.java:1004) at org.apache.hadoop.hive.ql.exec.GroupByOperator.flush(GroupByOperator.java:1028)
> {code}
> GenericUDFOPEqualOrLessThan is redundant here as GenericUDFSQCountCheck does the same check.
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)