-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
HIVE-28677: Implement direct sql for delete table/partition column stats #5587
base: master
Are you sure you want to change the base?
Conversation
|
||
public boolean deletePartitionColumnStats(String catName, String dbName, String tblName, | ||
String partName, String colName, String engine) throws MetaException { | ||
String sqlFilter = "" + PARTITIONS + ".\"PART_NAME\" = ? "; |
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.
Empty String can be removed from the value of sqlFilter
?
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.
Addressed.
return new GetHelper<Boolean>(catName, dbName, tableName, true, true) { | ||
@Override | ||
protected String describeResult() { | ||
return "delete prtition column stats"; |
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.
nit: partition spelling.
LGTM +1 (non-binding) |
Quality Gate passedIssues Measures |
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.
+1 LGTM
What changes were proposed in this pull request?
Improve the performance of deleting column stats for wide table.
Why are the changes needed?
The JDO implementation of deleting column stats needs to retrieve the column stats objects, it could be slow if the table has many columns.
Does this PR introduce any user-facing change?
No.
Is the change a dependency upgrade?
No.
How was this patch tested?
Add some unit tests:
mvn test -Dtest.groups= -Dtest=org.apache.hadoop.hive.metastore.TestObjectStore#testPartitionStatisticsOps -pl :hive-standalone-metastore-server