Skip to content

HIVE-29432: Autogather column statistics missing for tables containing a column with an unsupported type#6374

Merged
kasakrisz merged 4 commits into
apache:masterfrom
thomasrebele:tr/HIVE-29432
Apr 22, 2026
Merged

HIVE-29432: Autogather column statistics missing for tables containing a column with an unsupported type#6374
kasakrisz merged 4 commits into
apache:masterfrom
thomasrebele:tr/HIVE-29432

Conversation

@thomasrebele

@thomasrebele thomasrebele commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

HIVE-29432

What changes were proposed in this pull request?

When the column statistics are calculated, skip the columns with unsupported types, but calculate the statistics for all supported types.

Why are the changes needed?

If a table contains a column of certain types (union, struct, list, but also TIMESTAMP WITH LOCAL TIME ZONE), then no column statistics are gathered.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

I've added a q file test.

@thomasrebele

Copy link
Copy Markdown
Contributor Author

I think the test failure of TestReplicationMetricCollector.testSuccessOptimizedBootstrapDumpMetrics is not related to this PR. The test passes when executed locally. It didn't fail during the previous versions of the PR, so it might be some flakiness of TestReplicationMetricCollector.

@thomasrebele thomasrebele marked this pull request as ready for review March 20, 2026 22:34
Comment thread ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java Outdated
Comment thread ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsSemanticAnalyzer.java Outdated
Comment thread ql/src/test/results/clientpositive/llap/cast_null_to_complex.q.out
Comment thread ql/src/test/queries/clientpositive/stats_unsupported_type.q Outdated
Comment thread ql/src/test/results/clientpositive/llap/lateral_view.q.out
Comment thread ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java Outdated
@sonarqubecloud

sonarqubecloud Bot commented Apr 8, 2026

Copy link
Copy Markdown

@kasakrisz kasakrisz merged commit b81ffb3 into apache:master Apr 22, 2026
2 checks passed
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.

3 participants