deniskuzZ commented on code in PR #5822:
URL: https://github.com/apache/hive/pull/5822#discussion_r2102379019
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/StatsUpdater.java:
##########
@@ -81,10 +83,14 @@ public void gatherStats(HiveConf hiveConf, CompactionInfo
ci, Map<String, String
sb.append(")");
}
sb.append(" compute statistics");
- if (!conf.getBoolVar(HiveConf.ConfVars.HIVE_STATS_AUTOGATHER) &&
ci.isMajorCompaction()) {
- List<String> columnList =
msc.findColumnsWithStats(CompactionInfo.compactionInfoToStruct(ci));
+ if (ci.isMajorCompaction()) {
+ List<String> columnList =
msc.findColumnsWithStats(CompactionInfo.compactionInfoToStruct(ci)).stream()
+ .filter(columnName ->
!StatsSetupConst.areColumnStatsUptoDate(tableProperties, columnName))
Review Comment:
maybe use `allMatch`
````
boolean isStatsUpToDate = [columnList].stream.allMatch(columnName ->
StatsSetupConst.areColumnStatsUptoDate(tableProperties, columnName))`
````
would it work for the partitioned table?
`StatsSetupConst.areColumnStatsUptoDate(tableProperties`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]