[
https://issues.apache.org/jira/browse/HIVE-26788?focusedWorklogId=831258&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-831258
]
ASF GitHub Bot logged work on HIVE-26788:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Dec/22 04:51
Start Date: 06/Dec/22 04:51
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 is 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.
Issue Time Tracking
-------------------
Worklog Id: (was: 831258)
Time Spent: 1h 20m (was: 1h 10m)
> 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 20m
> 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)