[
https://issues.apache.org/jira/browse/HIVE-26788?focusedWorklogId=834069&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-834069
]
ASF GitHub Bot logged work on HIVE-26788:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Dec/22 08:05
Start Date: 16/Dec/22 08:05
Worklog Time Spent: 10m
Work Description: SourabhBadhya commented on code in PR #3812:
URL: https://github.com/apache/hive/pull/3812#discussion_r1050467231
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/StatsUpdater.java:
##########
@@ -73,6 +72,18 @@ public void gatherStats(CompactionInfo ci, HiveConf conf,
String userName, Strin
sb.append(")");
}
sb.append(" compute statistics");
+ if (!conf.getBoolVar(HiveConf.ConfVars.HIVESTATSAUTOGATHER) &&
ci.isMajorCompaction() && msc != null) {
+ List<String> columnList =
msc.findColumnsWithStats(CompactionInfo.compactionInfoToStruct(ci));
+ if (!columnList.isEmpty()) {
Review Comment:
Implemented. Done
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/StatsUpdater.java:
##########
@@ -73,6 +72,18 @@ public void gatherStats(CompactionInfo ci, HiveConf conf,
String userName, Strin
sb.append(")");
}
sb.append(" compute statistics");
+ if (!conf.getBoolVar(HiveConf.ConfVars.HIVESTATSAUTOGATHER) &&
ci.isMajorCompaction() && msc != null) {
Review Comment:
Done.
Issue Time Tracking
-------------------
Worklog Id: (was: 834069)
Time Spent: 4h 40m (was: 4.5h)
> Update stats of table/partition using noscan operation when stats autogather
> is enabled
> ---------------------------------------------------------------------------------------
>
> 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: 4h 40m
> Remaining Estimate: 0h
>
> Currently, statistics are always updated for major compaction and never
> 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 both
> these 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 if stats autogather is enabled. If autostats gather is
> disabled then go for full update of statistics.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)