From eb6791a60c24dd8758e2852e0dca5f933ef3371f Mon Sep 17 00:00:00 2001 From: Gian Merlino Date: Wed, 13 Sep 2017 09:52:01 -0700 Subject: [PATCH] TimestampAggregator: Avoid cross-classloader access of package-private field. (#4788) * TimestampAggregator: Avoid cross-classloader access of package-private field. * Simplify. * Remove unused import. --- .../java/io/druid/query/aggregation/TimestampAggregator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions-contrib/time-min-max/src/main/java/io/druid/query/aggregation/TimestampAggregator.java b/extensions-contrib/time-min-max/src/main/java/io/druid/query/aggregation/TimestampAggregator.java index 78209b1acd6..cbfd20b4a27 100644 --- a/extensions-contrib/time-min-max/src/main/java/io/druid/query/aggregation/TimestampAggregator.java +++ b/extensions-contrib/time-min-max/src/main/java/io/druid/query/aggregation/TimestampAggregator.java @@ -26,7 +26,7 @@ import java.util.Comparator; public class TimestampAggregator implements Aggregator { - static final Comparator COMPARATOR = LongMaxAggregator.COMPARATOR; + static final Comparator COMPARATOR = Comparator.comparingLong(n -> ((Number) n).longValue()); static Object combineValues(Comparator comparator, Object lhs, Object rhs) {