asolimando commented on code in PR #3137:
URL: https://github.com/apache/hive/pull/3137#discussion_r1045890680


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java:
##########
@@ -1004,41 +1045,51 @@ private long evaluateComparator(Statistics stats, 
AnnotateStatsProcCtx aspCtx, E
         closedBound = isClosedBound(udf);
       } else {
         // default
-        return numRows / 3;
+        return currNumRows / 3;
       }
 
       ColStatistics cs = 
stats.getColumnStatisticsFromColName(columnDesc.getColumn());
+      String colTypeLowerCase = columnDesc.getTypeString().toLowerCase();
+
+      if (FilterSelectivityEstimator.isHistogramAvailable(cs)) {
+        try {
+          return evaluateComparatorWithHistogram(
+              cs, currNumRows, colTypeLowerCase, boundValue, upperBound, 
closedBound);
+        } catch (SketchesArgumentException e) {
+          LOG.info("Sketch-based statistics estimation failed, falling back to 
regular estimation", e);

Review Comment:
   That specific family of methods from _slf4j_ with an extra `Throwable` 
parameter already take care of nicely formatting the exception, no separator is 
needed, you can check here for some examples of how the stacktrace will be 
displayed after the debug message: 
https://www.baeldung.com/slf4j-log-exceptions 



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