[ https://issues.apache.org/jira/browse/HIVE-26788?focusedWorklogId=831260&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-831260 ]
ASF GitHub Bot logged work on HIVE-26788: ----------------------------------------- Author: ASF GitHub Bot Created on: 06/Dec/22 04:56 Start Date: 06/Dec/22 04:56 Worklog Time Spent: 10m Work Description: SourabhBadhya commented on code in PR #3812: URL: https://github.com/apache/hive/pull/3812#discussion_r1040462553 ########## ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/StatsUpdater.java: ########## @@ -52,10 +52,6 @@ public final class StatsUpdater { */ public void gatherStats(CompactionInfo ci, HiveConf conf, String userName, String compactionQueueName) { try { - if (!ci.isMajorCompaction()) { Review Comment: I thought this was a problem but I did some investigation. There is a if-else statement which decides whether a MR or Tez task needs to be created. For the `NOSCAN` operation, it does not generate a MR or a Tez task. https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMRTableScan1.java#L88-L108 (If basic stats is ok to be used, then MR or Tez task is not created) https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMRTableScan1.java#L128-L134 (If no scan is used then the MapRedTask is removed from the plan). AFAIK Tez sessions are created only when a Tez task is executed. https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java#L207-L208 Issue Time Tracking ------------------- Worklog Id: (was: 831260) Time Spent: 1h 40m (was: 1.5h) > Update stats of table/partition after minor compaction using noscan operation > ----------------------------------------------------------------------------- > > Key: HIVE-26788 > URL: https://issues.apache.org/jira/browse/HIVE-26788 > Project: Hive > Issue Type: Improvement > Reporter: Sourabh Badhya > Assignee: Sourabh Badhya > Priority: Major > Labels: pull-request-available > Time Spent: 1h 40m > Remaining Estimate: 0h > > Currently, statistics are not updated for minor compaction since minor > compaction performs little updates on the statistics (such as number of files > in table/partition & total size of the table/partition). It is better to > utilize NOSCAN operation for minor compaction since NOSCAN operations > performs faster update of statistics and updates the relevant fields such as > number of files & total sizes of the table/partitions. -- This message was sent by Atlassian Jira (v8.20.10#820010)