Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIVE-28744: fix INT_TYPE and BIGINT_TYPE range estimate values #5637

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

barking-code
Copy link

What changes were proposed in this pull request?

Fix INT and BIGINT type column range statistics estimate values.

Why are the changes needed?

When hive.stats.estimate and hive.stats.fetch.column.stats are enabled and Int or bigint columns don't have col stats about ranges, 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.

  1. No stats for bigint type column.
image-2025-2-5_0-11-21
  1. Write a query using {BIGINT Type col} > INTEGER.MAX_VALUE, and EXPLAIN it.
image-2025-2-5_0-9-25

Does this PR introduce any user-facing change?

No

Is the change a dependency upgrade?

No

How was this patch tested?

Copy link

sonarqubecloud bot commented Feb 7, 2025

@okumin
Copy link
Contributor

okumin commented Feb 8, 2025

@barking-code Thanks for locating the issue and providing the fix. Could you update the output of the failing test cases? Please feel free to ask me if you have any questions.
https://ci.hive.apache.org/blue/organizations/jenkins/hive-precommit/detail/PR-5637/1/pipeline/580/

@barking-code
Copy link
Author

@barking-code Thanks for locating the issue and providing the fix. Could you update the output of the failing test cases? Please feel free to ask me if you have any questions. https://ci.hive.apache.org/blue/organizations/jenkins/hive-precommit/detail/PR-5637/1/pipeline/580/

@okumin
Hello, okumin.
I can access this page. Displaying 404 error, but I think it is an authentication or authorization issue.
Do you know how I can access this page? And do I need to add tests to pass CI tests?

@Aggarwal-Raghav
Copy link
Contributor

@barking-code , first login to the CI (top right hand side) before directly opening the URL mentioned in above comments. From CI, you can check which tests are failing and update/fix them accordingly.
Screenshot 2025-02-10 at 9 42 30 PM

If you want to overwrite the q.out files then you can use a command like this:
mvn test -Dtest=<DriverName> -Dqfile=<test_name>.q -Dtest.output.overwrite
For example:
mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile=msck_repair_8.q -Drat.skip -Dtest.output.overwrite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants