-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Skip updating partition stats when adding empty stats partitions to Glue #25970
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
base: master
Are you sure you want to change the base?
Conversation
716ef21
to
87432b7
Compare
@@ -1106,6 +1106,7 @@ public void addPartitions(String databaseName, String tableName, List<PartitionW | |||
|
|||
// statistics are created after partitions because it is not clear if ordering matters in Glue | |||
var createStatisticsTasks = partitionsWithStatistics.stream() | |||
.filter(partitionWithStatistics -> partitionWithStatistics.getStatistics() != PartitionStatistics.empty()) |
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.
Does this impact cases where we actually want statistics to be reset to empty ?
E.g. Insert overwrite on a partition with hive statistics collection flag disabled
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.
The PartitionStatistics
contains HiveBasicStatistics
, this won't equal to the empty()
.
/test-with-secrets sha=87432b76aeba578904a9f573f8af77b960ec18ae |
The CI workflow run with tests that require additional secrets finished as failure: https://github.com/trinodb/trino/actions/runs/15571937661 |
87432b7
to
9e0a289
Compare
@@ -87,6 +95,40 @@ public void cleanUpSchema() | |||
getQueryRunner().execute("DROP SCHEMA " + testSchema + " CASCADE"); | |||
} | |||
|
|||
@Test | |||
void testInsertOverwriteStatisticsDisabled() |
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.
@raunaqmorarka I add the test to show case that the last commit won't influence the metastore operations
The test failures in https://github.com/trinodb/trino/actions/runs/15571937661 looks like not relates to the change |
4ba1e08
to
2bd5ceb
Compare
testing/trino-testing/src/main/java/io/trino/testing/MultisetAssertions.java
Outdated
Show resolved
Hide resolved
Add Glue metastore access operations test for insert overwrite with stats disabled
Add Glue metastore access operations test for `sync_partition_metadata` procedure in `TestHiveGlueMetastoreAccessOperations`
2bd5ceb
to
bef0465
Compare
/test-with-secrets sha=bef046541465899f32b9300e7d041ec8e2c25c57 |
The CI workflow run with tests that require additional secrets finished as failure: https://github.com/trinodb/trino/actions/runs/15599241399 |
It's a known flaky test? https://github.com/trinodb/trino/actions/runs/15599241399/job/43936056919#step:18:44 |
Description
Additional context and related issues
Release notes
(x) 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.
( ) Release notes are required, with the following suggested text: