[ https://issues.apache.org/jira/browse/HIVE-23959?focusedWorklogId=464901&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-464901 ]
ASF GitHub Bot logged work on HIVE-23959: ----------------------------------------- Author: ASF GitHub Bot Created on: 31/Jul/20 06:50 Start Date: 31/Jul/20 06:50 Worklog Time Spent: 10m Work Description: kgyrtkirk commented on a change in pull request #1341: URL: https://github.com/apache/hive/pull/1341#discussion_r463435574 ########## File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java ########## @@ -9483,6 +9483,81 @@ private void dropPartitionColumnStatisticsNoTxn( queryWithParams.getLeft().closeAll(); } + @Override + public void deleteAllPartitionColumnStatistics(TableName tn, String writeIdList) { + + String catName = tn.getCat(); + String dbName = tn.getDb(); + String tableName = tn.getTable(); + + Query query = null; + dbName = org.apache.commons.lang3.StringUtils.defaultString(dbName, Warehouse.DEFAULT_DATABASE_NAME); + catName = normalizeIdentifier(catName); + if (tableName == null) { + throw new RuntimeException("Table name is null."); + } + boolean ret = false; + try { + openTransaction(); + MTable mTable = getMTable(catName, dbName, tableName); + + query = pm.newQuery(MPartitionColumnStatistics.class); + + Object engine = null; Review comment: oh..sorry; I plan to disable this option by default - and leave only a targeted test to cover for it but I wanted to make a sanity check that this will work in case all tests are executed (and it does) I should have marked it as wip or something..I'll clean up things like this in the next version. thank you for taking a look! I was testing with psql so far but I'll check mysql as well! ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 464901) Time Spent: 50m (was: 40m) > Provide an option to wipe out column stats for partitioned tables in case of > column removal > ------------------------------------------------------------------------------------------- > > Key: HIVE-23959 > URL: https://issues.apache.org/jira/browse/HIVE-23959 > Project: Hive > Issue Type: Improvement > Reporter: Zoltan Haindrich > Assignee: Zoltan Haindrich > Priority: Major > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > in case of column removal / replacement - an update for each partition is > neccessary; which could take a while. > goal here is to provide an option to switch to the bulk removal of column > statistics instead of working hard to retain as much as possible from the old > stats. -- This message was sent by Atlassian Jira (v8.3.4#803005)