Skip to content

HIVE-28170: Implement drop stats#6391

Open
soumyakanti3578 wants to merge 14 commits intoapache:masterfrom
soumyakanti3578:HIVE-28170-dropstats
Open

HIVE-28170: Implement drop stats#6391
soumyakanti3578 wants to merge 14 commits intoapache:masterfrom
soumyakanti3578:HIVE-28170-dropstats

Conversation

@soumyakanti3578
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Implements drop stats for columns. There is an earlier PR for this: #5721 - its review comments have been addressed in this PR.

Why are the changes needed?

https://issues.apache.org/jira/browse/HIVE-28170

Does this PR introduce any user-facing change?

No, except the new feature of dropping column stats.

How was this patch tested?

mvn test -pl itests/qtest -Pitests -Dtest=TestMiniLlapLocalCliDriver -Dtest.output.overwrite=true -Dqfile="drop_stats_for_columns.q,drop_histogram_stats_for_columns.q"
mvn test -pl itests/qtest -Pitests -Dtest=TestNegativeLlapCliDriver -Dtest.output.overwrite=true -Dqfile="drop_stats_for_columns_iceberg.q"

@sonarqubecloud
Copy link
Copy Markdown

@soumyakanti3578 soumyakanti3578 marked this pull request as ready for review March 28, 2026 00:21
* ALTER TABLE src_stat DROP STATISTICS for columns;
*/
@Explain(displayName = "Column Stats Drop Work", explainLevels = {Level.USER, Level.DEFAULT, Level.EXTENDED})
public record ColumnStatsDropWork(String dbName, String tableName) implements Serializable {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can TableName used here?

Comment on lines +9 to +17
insert into test_stats (a, b, c) values ("a", 2, 1.1);
insert into test_stats (a, b, c) values ("b", 2, 2.1);
insert into test_stats (a, b, c) values ("c", 2, 2.1);
insert into test_stats (a, b, c) values ("d", 2, 3.1);
insert into test_stats (a, b, c) values ("e", 2, 3.1);
insert into test_stats (a, b, c) values ("f", 2, 4.1);
insert into test_stats (a, b, c) values ("g", 2, 5.1);
insert into test_stats (a, b, c) values ("h", 2, 6.1);
insert into test_stats (a, b, c) values ("i", 3, 6.1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it enough to have only 2 inserts?

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