Blazer-007 commented on code in PR #4090: URL: https://github.com/apache/gobblin/pull/4090#discussion_r1904115989
########## gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/activity/impl/GenerateWorkUnitsImpl.java: ########## @@ -95,7 +95,11 @@ public WorkUnitsSizeSummary asSizeSummary(int numQuantiles) { private static List<Double> getQuantiles(TDigest digest, int numQuantiles) { List<Double> quantileMinSizes = Lists.newArrayList(); for (int i = 1; i <= numQuantiles; i++) { - quantileMinSizes.add(digest.quantile((i * 1.0) / numQuantiles)); + double currQuantileMinSize = digest.quantile((i * 1.0) / numQuantiles); + if (Double.isNaN(currQuantileMinSize)) { + currQuantileMinSize = 0.0; + } + quantileMinSizes.add(currQuantileMinSize); Review Comment: No, if numQuantiles > 0 then this code gives NaN if there is no workunit and by default numQuantiles is 10 so in this case all values will be filled with NaN and then this will give issue when fetching medianSize which will be NaN -- 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: dev-unsubscr...@gobblin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org