[
https://issues.apache.org/jira/browse/HIVE-28744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Denys Kuzmenko updated HIVE-28744:
----------------------------------
Target Version/s: (was: 4.0.1)
> Fix the row count estimation for INT and BIGINT types
> -----------------------------------------------------
>
> Key: HIVE-28744
> URL: https://issues.apache.org/jira/browse/HIVE-28744
> Project: Hive
> Issue Type: Bug
> Components: Query Planning, Statistics
> Reporter: Hocheol Na
> Assignee: Denys Kuzmenko
> Priority: Major
> Labels: pull-request-available
> Attachments:
> 0001-HIVE-28744-fix-INT_TYPE-and-BIGINT_TYPE-range-estima.patch,
> image-2025-02-07-10-29-14-137.png
>
>
> The Int and Bigint type range estimation is wrong in estimateColStats.
> !image-2025-02-07-10-29-14-137.png|width=583,height=144!
>
> When `hive.stats.estimate` and `hive.stats.fetch.column.stats` are enabled
> and Int or bigint columns don't have col stats, incorrect ranges are used in
> the query plan, which returns the wrong num rows.
>
> e.g) If `\{BIGINT Type col} > INTEGER.MAX_VALUE` is in query, estimated
> numRows is always 0.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)