diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/first/DoubleFirstAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/first/DoubleFirstAggregator.java index f713a15de1907..cf121f72fc98f 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/first/DoubleFirstAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/first/DoubleFirstAggregator.java @@ -34,7 +34,7 @@ public DoubleFirstAggregator(BaseLongColumnValueSelector timeSelector, ColumnVal } @Override - void setFirstValue(ColumnValueSelector valueSelector) + void setFirstValue() { firstValue = valueSelector.getDouble(); } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/first/DoubleFirstAggregatorFactory.java b/processing/src/main/java/org/apache/druid/query/aggregation/first/DoubleFirstAggregatorFactory.java index dc042aa2ab939..be3bce7ae02e4 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/first/DoubleFirstAggregatorFactory.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/first/DoubleFirstAggregatorFactory.java @@ -238,7 +238,6 @@ public byte[] getCacheKey() @Override public ColumnType getIntermediateType() { - // if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde return TYPE; } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/first/FloatFirstAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/first/FloatFirstAggregator.java index d02bfdb922cdd..987937c2ba879 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/first/FloatFirstAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/first/FloatFirstAggregator.java @@ -38,7 +38,7 @@ public FloatFirstAggregator( } @Override - void setFirstValue(ColumnValueSelector valueSelector) + void setFirstValue() { firstValue = valueSelector.getFloat(); } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/first/FloatFirstAggregatorFactory.java b/processing/src/main/java/org/apache/druid/query/aggregation/first/FloatFirstAggregatorFactory.java index 7884ea4a92804..0336aaaa294db 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/first/FloatFirstAggregatorFactory.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/first/FloatFirstAggregatorFactory.java @@ -235,7 +235,6 @@ public byte[] getCacheKey() @Override public ColumnType getIntermediateType() { - // if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde return TYPE; } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/first/LongFirstAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/first/LongFirstAggregator.java index af070dbb5e8c1..d229819382e9e 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/first/LongFirstAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/first/LongFirstAggregator.java @@ -34,7 +34,7 @@ public LongFirstAggregator(BaseLongColumnValueSelector timeSelector, ColumnValue } @Override - void setFirstValue(ColumnValueSelector valueSelector) + void setFirstValue() { firstValue = valueSelector.getLong(); } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/first/LongFirstAggregatorFactory.java b/processing/src/main/java/org/apache/druid/query/aggregation/first/LongFirstAggregatorFactory.java index 3ecaabf15971a..27cad349ead44 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/first/LongFirstAggregatorFactory.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/first/LongFirstAggregatorFactory.java @@ -234,7 +234,6 @@ public byte[] getCacheKey() @Override public ColumnType getIntermediateType() { - // if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde return TYPE; } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/first/NumericFirstAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/first/NumericFirstAggregator.java index b7f88f963fed6..b3092377b578d 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/first/NumericFirstAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/first/NumericFirstAggregator.java @@ -52,7 +52,7 @@ public NumericFirstAggregator(BaseLongColumnValueSelector timeSelector, ColumnVa /** * Store the current primitive typed 'first' value */ - abstract void setFirstValue(ColumnValueSelector valueSelector); + abstract void setFirstValue(); /** * Store a non-null first value @@ -71,7 +71,7 @@ public void aggregate() if (object instanceof SerializablePair) { SerializablePair inPair = (SerializablePair) object; - if (inPair != null && inPair.lhs < firstTime) { + if (inPair.lhs < firstTime) { firstTime = inPair.lhs; if (inPair.rhs == null) { rhsNull = true; @@ -88,7 +88,7 @@ public void aggregate() if (time < firstTime) { firstTime = time; if (useDefault || !valueSelector.isNull()) { - setFirstValue(valueSelector); + setFirstValue(); rhsNull = false; } else { setFirstValue(0); diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/first/NumericFirstBufferAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/first/NumericFirstBufferAggregator.java index c9911399ed11d..4531ee71bcd6f 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/first/NumericFirstBufferAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/first/NumericFirstBufferAggregator.java @@ -106,7 +106,7 @@ public void aggregate(ByteBuffer buf, int position) final Object object = valueSelector.getObject(); if (object instanceof SerializablePair) { final SerializablePair inPair = (SerializablePair) object; - if (inPair != null && inPair.lhs < firstTime) { + if (inPair.lhs < firstTime) { if (inPair.rhs == null) { updateTimeWithNull(buf, position, inPair.lhs); } else { diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/last/DoubleLastAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/last/DoubleLastAggregator.java index e5eca666986d3..009e9c82333fc 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/last/DoubleLastAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/last/DoubleLastAggregator.java @@ -34,7 +34,7 @@ public DoubleLastAggregator(BaseLongColumnValueSelector timeSelector, ColumnValu } @Override - void setLastValue(ColumnValueSelector valueSelector) + void setLastValue() { lastValue = valueSelector.getDouble(); } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/last/DoubleLastAggregatorFactory.java b/processing/src/main/java/org/apache/druid/query/aggregation/last/DoubleLastAggregatorFactory.java index de6e707310f75..55da0be236a30 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/last/DoubleLastAggregatorFactory.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/last/DoubleLastAggregatorFactory.java @@ -265,7 +265,6 @@ public byte[] getCacheKey() @Override public ColumnType getIntermediateType() { - // if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde return TYPE; } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/last/FloatLastAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/last/FloatLastAggregator.java index c55fbb997baa3..63147a92db770 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/last/FloatLastAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/last/FloatLastAggregator.java @@ -34,7 +34,7 @@ public FloatLastAggregator(BaseLongColumnValueSelector timeSelector, ColumnValue } @Override - void setLastValue(ColumnValueSelector valueSelector) + void setLastValue() { lastValue = valueSelector.getFloat(); } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/last/FloatLastAggregatorFactory.java b/processing/src/main/java/org/apache/druid/query/aggregation/last/FloatLastAggregatorFactory.java index a42491013dbb8..a97eb5f61fd30 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/last/FloatLastAggregatorFactory.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/last/FloatLastAggregatorFactory.java @@ -264,7 +264,6 @@ public byte[] getCacheKey() @Override public ColumnType getIntermediateType() { - // if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde return TYPE; } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/last/LongLastAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/last/LongLastAggregator.java index b07c3784aaeb0..f5f5791da960c 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/last/LongLastAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/last/LongLastAggregator.java @@ -34,7 +34,7 @@ public LongLastAggregator(BaseLongColumnValueSelector timeSelector, ColumnValueS } @Override - void setLastValue(ColumnValueSelector valueSelector) + void setLastValue() { lastValue = valueSelector.getLong(); } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/last/LongLastAggregatorFactory.java b/processing/src/main/java/org/apache/druid/query/aggregation/last/LongLastAggregatorFactory.java index 51063bdb5d94a..bb407400106c8 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/last/LongLastAggregatorFactory.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/last/LongLastAggregatorFactory.java @@ -262,7 +262,6 @@ public byte[] getCacheKey() @Override public ColumnType getIntermediateType() { - // if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde return TYPE; } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/last/NumericLastAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/last/NumericLastAggregator.java index 8d36d534a8723..36032e71ecef6 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/last/NumericLastAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/last/NumericLastAggregator.java @@ -54,7 +54,7 @@ public NumericLastAggregator(BaseLongColumnValueSelector timeSelector, ColumnVal /** * Store the current primitive typed 'last' value */ - abstract void setLastValue(ColumnValueSelector valueSelector); + abstract void setLastValue(); abstract void setLastValue(Number lastValue); @@ -70,7 +70,7 @@ public void aggregate() if (object instanceof SerializablePair) { final SerializablePair inPair = (SerializablePair) object; - if (inPair != null && inPair.lhs >= lastTime) { + if (inPair.lhs >= lastTime) { lastTime = inPair.lhs; if (inPair.rhs == null) { @@ -88,7 +88,7 @@ public void aggregate() if (time >= lastTime) { lastTime = time; if (useDefault || !valueSelector.isNull()) { - setLastValue(valueSelector); + setLastValue(); rhsNull = false; } else { setLastValue(0); diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/last/NumericLastBufferAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/last/NumericLastBufferAggregator.java index e6f4e6a893b40..33209bd7007a9 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/last/NumericLastBufferAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/last/NumericLastBufferAggregator.java @@ -22,7 +22,7 @@ import org.apache.druid.collections.SerializablePair; import org.apache.druid.common.config.NullHandling; import org.apache.druid.query.aggregation.BufferAggregator; -import org.apache.druid.query.monomorphicprocessing.RuntimeShapeInspector; +import org.apache.druid.query.monomor:Q:q!phicprocessing.RuntimeShapeInspector; import org.apache.druid.segment.BaseLongColumnValueSelector; import org.apache.druid.segment.ColumnValueSelector; @@ -110,7 +110,7 @@ public void aggregate(ByteBuffer buf, int position) if (object instanceof SerializablePair) { final SerializablePair inPair = (SerializablePair) object; - if (inPair != null && inPair.lhs >= lastTime) { + if (inPair.lhs >= lastTime) { if (inPair.rhs == null) { updateTimeWithNull(buf, position, inPair.lhs); } else {