dengzhhu653 commented on code in PR #5950:
URL: https://github.com/apache/hive/pull/5950#discussion_r2444073519


##########
ql/src/java/org/apache/hadoop/hive/ql/stats/BasicStatsTask.java:
##########
@@ -182,6 +187,27 @@ public Object process(StatsAggregator statsAggregator) 
throws HiveException, Met
         parameters.putAll(providedBasicStats);
       }
 
+      try {
+        final long threshold = (conf != null)
+                ? 
conf.getLongVar(HiveConf.ConfVars.HIVE_MERGE_MAP_FILES_AVG_SIZE)
+                : 
HiveConf.ConfVars.HIVE_MERGE_MAP_FILES_AVG_SIZE.defaultLongVal;
+
+        final String who = (p.getPartition() == null)
+                ? "table " + p.getTable().getFullyQualifiedName()
+                : "partition " + p.getPartition().getName();
+
+        SmallFilesWarningUtil.smallFilesWarnings(parameters, 100L, threshold, 
who, "[ANALYZE]")
+                .ifPresent(msg -> {
+                  LOG.warn(msg);
+                  SessionState ss = SessionState.get();
+                  if (ss != null && ss.getConsole() != null) {
+                    ss.getConsole().printInfo(msg);
+                  }
+                });
+      } catch (Exception e) {

Review Comment:
   nit: remove this `catch`?



-- 
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]

Reply via email to