You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/08/01 00:40:00 UTC

[jira] [Work logged] (HIVE-24969) Predicates may be removed when decorrelating subqueries with lateral

     [ https://issues.apache.org/jira/browse/HIVE-24969?focusedWorklogId=632017&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-632017 ]

ASF GitHub Bot logged work on HIVE-24969:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Aug/21 00:39
            Start Date: 01/Aug/21 00:39
    Worklog Time Spent: 10m 
      Work Description: dengzhhu653 commented on a change in pull request #2145:
URL: https://github.com/apache/hive/pull/2145#discussion_r680428112



##########
File path: ql/src/test/results/clientpositive/llap/lateral_left_semi_join.q.out
##########
@@ -0,0 +1,305 @@
+Warning: Shuffle Join MERGEJOIN[54][tables = [sq_1_notin_nullcheck]] in Stage 'Reducer 3' is a cross product

Review comment:
       One of the parent of `Reducer 3` is a union work(alias `T`), when CrossProductHandler [analyzes](https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CrossProductHandler.java#L280-L289) the union work, as `work.getAllRootOperators()` returns an empty set, so the inputs of  `t` and `lv` do not added to the reduce sink info of the join, cause the waring message missing some table aliases. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 632017)
    Time Spent: 1h 40m  (was: 1.5h)

> Predicates may be removed when decorrelating subqueries with lateral
> --------------------------------------------------------------------
>
>                 Key: HIVE-24969
>                 URL: https://issues.apache.org/jira/browse/HIVE-24969
>             Project: Hive
>          Issue Type: Bug
>          Components: Logical Optimizer
>            Reporter: Zhihua Deng
>            Assignee: Zhihua Deng
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Step to reproduce:
> {code:java}
> select count(distinct logItem.triggerId)
> from service_stat_log LATERAL VIEW explode(logItems) LogItemTable AS logItem
> where logItem.dsp in ('delivery', 'ocpa')
> and logItem.iswin = true
> and logItem.adid in (
>  select distinct adId
>  from ad_info
>  where subAccountId in (16010, 14863));  {code}
> For predicates _logItem.dsp in ('delivery', 'ocpa')_  and _logItem.iswin = true_ are removed when doing ppd: JOIN ->   RS  -> LVJ.  The JOIN has candicates: logitem -> [logItem.dsp in ('delivery', 'ocpa'), logItem.iswin = true],when pushing them to the RS followed by LVJ,  none of them are pushed, the candicates of logitem are removed finally by default, which cause to the wrong result.



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