You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Seonggon Namgung (Jira)" <ji...@apache.org> on 2025/08/26 03:26:00 UTC

[jira] [Commented] (HIVE-29161) Correct the row count computation affected by Dynamic SemiJoin Reduction

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

Seonggon Namgung commented on HIVE-29161:
-----------------------------------------

Merged to master.

Thanks to [~dkuzmenko] and [~zabetak] for the review!

> Correct the row count computation affected by Dynamic SemiJoin Reduction
> ------------------------------------------------------------------------
>
>                 Key: HIVE-29161
>                 URL: https://issues.apache.org/jira/browse/HIVE-29161
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Seonggon Namgung
>            Assignee: Seonggon Namgung
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.2.0
>
>
> During SemiJoin branch removal based on benefit, Hive temporarily updates the statistics of the filter operator so that a later-visited SemiJoin branch is aware of the effect of the surviving SemiJoin branch. The adjusted number of rows is computed using the following code:
> {code:java}
> long newNumRows = (long) (1.0 - roi.reductionFactor) * roi.filterStats.getNumRows(); {code}
> Due to the missing parentheses, Hive currently sets newNumRows either to 1 (adjusted from 0) or to the original value. This leads to incorrect decisions in subsequent SemiJoin benefit computations and may result in suboptimal query plans.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)