diff --git a/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramAggregator.java b/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramAggregator.java index e35cba0a1cf6..ba93ab479af7 100644 --- a/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramAggregator.java +++ b/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramAggregator.java @@ -52,9 +52,6 @@ public ApproximateHistogramAggregator( @Override public void aggregate() { - // In case of ExpressionColumnValueSelector isNull will compute the expression and then give the result, - // the check for is NullHandling.replaceWithDefault is there to not have any performance impact of calling - // isNull for default case. if (!selector.isNull()) { histogram.offer(selector.getFloat()); } diff --git a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQInsertTest.java b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQInsertTest.java index a07d57f31687..ad020d4548fd 100644 --- a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQInsertTest.java +++ b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQInsertTest.java @@ -1763,7 +1763,7 @@ public void testEmptyInsertLimitQuery(String contextName, Map co private List expectedFooRows() { - return ImmutableList.of( + return Arrays.asList( new Object[]{946684800000L, "", 1L}, new Object[]{946771200000L, "10.1", 1L}, new Object[]{946857600000L, "2", 1L}, diff --git a/processing/src/main/java/org/apache/druid/frame/field/NumericArrayFieldWriter.java b/processing/src/main/java/org/apache/druid/frame/field/NumericArrayFieldWriter.java index fd86687e5a49..760374129b38 100644 --- a/processing/src/main/java/org/apache/druid/frame/field/NumericArrayFieldWriter.java +++ b/processing/src/main/java/org/apache/druid/frame/field/NumericArrayFieldWriter.java @@ -171,12 +171,6 @@ public void inspectRuntimeShape(RuntimeShapeInspector inspector) @Override public boolean isNull() { - // Arrays preserve the individual element's nullity when they are written and read. - // Therefore, when working with SQL incompatible mode, [7, null] won't change to [7, 0] when written to and - // read from the underlying serialization (as compared with the primitives). Therefore, - // even when NullHandling.replaceWithDefault() is true we need to write null as is, and not convert it to their - // default value when writing the array. Therefore, the check is `getObject() == null` ignoring the value of - // `NullHandling.replaceWithDefaul()`. return getObject() == null; } diff --git a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java index 74846b7b2427..0f64988ddf2e 100644 --- a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java +++ b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java @@ -644,10 +644,7 @@ public static CloseableGrouperIterator makeGrouperIterat for (int i = resultRowDimensionStart; i < entry.getKey().getKey().length; i++) { if (dimsToInclude == null || dimsToIncludeBitSet.get(i - resultRowDimensionStart)) { final Object dimVal = entry.getKey().getKey()[i]; - resultRow.set( - i, - dimVal instanceof String ? dimVal : dimVal - ); + resultRow.set(i, dimVal); } }