[
https://issues.apache.org/jira/browse/HIVE-28744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Butao Zhang updated HIVE-28744:
-------------------------------
Fix Version/s: 4.1.0
4.2.0
> 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
> Affects Versions: 4.0.1
> Reporter: Hocheol Na
> Assignee: Denys Kuzmenko
> Priority: Major
> Labels: hive-4.1.0-must, pull-request-available
> Fix For: 4.1.0, 4.2.0
>
> 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)