[
https://issues.apache.org/jira/browse/HIVE-29161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Seonggon Namgung resolved HIVE-29161.
-------------------------------------
Fix Version/s: 4.2.0
Resolution: Fixed
> 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)