Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
clintropolis committed Jan 7, 2025
1 parent 0fbe692 commit 7faec64
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1763,7 +1763,7 @@ public void testEmptyInsertLimitQuery(String contextName, Map<String, Object> co

private List<Object[]> expectedFooRows()
{
return ImmutableList.of(
return Arrays.asList(
new Object[]{946684800000L, "", 1L},
new Object[]{946771200000L, "10.1", 1L},
new Object[]{946857600000L, "2", 1L},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,10 +644,7 @@ public static CloseableGrouperIterator<RowBasedKey, ResultRow> 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);
}
}

Expand Down

0 comments on commit 7faec64

Please sign in to comment.