-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix hive ANALYZE when row count stats are missing #18828
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a Hive product test which reproduces the problem before your fix ?
ANALYZE TABLE Table1 PARTITION(ds='2008-04-09', hr) COMPUTE STATISTICS NOSCAN;
can be used in Hive to collect fileCount and onDiskDataSizeInBytes statistics without getting row count statistics
plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveBasicStatistics.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/test/java/io/trino/plugin/hive/AbstractTestHive.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftHiveMetastore.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastore.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHive.java
Show resolved
Hide resolved
Using |
Okay, were you able to manually reproduce the problem and verify the fix ? |
There is even fix for Hive for this issue (https://issues.apache.org/jira/browse/HIVE-19254). I can test it with some old version of hive. |
Description
Fixes #18798
Additional context and related issues
The problem is specific to hive metastore and newer versions of HMS have fixed this https://issues.apache.org/jira/browse/HIVE-19254
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: