-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-28655: Implement HMS Related Drop Stats Changes Part2 (param COLUMN_STAT_ACCURATE related changes) #5790
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
@@ -7431,6 +7431,13 @@ public boolean delete_column_statistics_req(DeleteColumnStatisticsRequest req) t | |||
if (!isPartitioned || req.isTableLevel()) { | |||
ret = rawStore.deleteTableColumnStatistics(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tableName, colNames, engine); | |||
if (ret) { | |||
Map<String, String> parameters = table.getParameters(); |
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 just remove the deleted columns
from the COLUMN_STATS_ACCURATE? using the StatsSetupConst.removeColumnStatsState
} | ||
partParams.put("COLUMN_STATS_ACCURATE", "false"); | ||
partition.setParameters(partParams); | ||
rawStore.alterPartition(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tableName, partVals, partition, null); |
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.
alter the partitions in bulk?
0c0499d
to
2318bb5
Compare
...e-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
Outdated
Show resolved
Hide resolved
...ne-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
Show resolved
Hide resolved
2318bb5
to
60d8cf3
Compare
60d8cf3
to
882007d
Compare
} else { | ||
// remove the deleted column names in parameter COLUMN_STATS_ACCURATE | ||
StatsSetupConst.removeColumnStatsState(table.getParameters(), colNames); | ||
} |
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.
Need to persist the changed parameters by rawStore.alterTable()
} else { | ||
// remove the deleted column names in parameter COLUMN_STATS_ACCURATE | ||
StatsSetupConst.removeColumnStatsState(partParams, colNames); | ||
} |
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.
need to persist the partition parameters after resetting the column stats
882007d
to
4b54b61
Compare
@@ -10363,6 +10365,8 @@ private boolean deleteTableColumnStatisticsViaJdo(String catName, String dbName, | |||
} | |||
mStatsObjColl = (List<MTableColumnStatistics>) query.executeWithArray(params.toArray()); | |||
pm.retrieveAll(mStatsObjColl); | |||
Long tableID = directSql.getTableId(dbName, tableName); |
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.
is there any reason to mix the direct sql with the jdo together? this deleteTableColumnStatisticsViaJdo
is for jdo query I guess. And we need to take care of the same in getSqlResult
path.
...tore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
Outdated
Show resolved
Hide resolved
...tore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
Outdated
Show resolved
Hide resolved
...tore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
Outdated
Show resolved
Hide resolved
4b54b61
to
f11ba0d
Compare
f11ba0d
to
4d22154
Compare
4d22154
to
d0afa49
Compare
d0afa49
to
0e31251
Compare
…AT_ACCURATE After Dropping
0e31251
to
fe37625
Compare
|
What changes were proposed in this pull request?
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?