From 78d847a1d2e193e719e258c60819ccedbc9aadf2 Mon Sep 17 00:00:00 2001 From: "joey.ljy" Date: Sun, 8 Oct 2023 10:33:02 +0800 Subject: [PATCH] move clearNull --- velox/functions/sparksql/aggregates/DecimalSumAggregate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/velox/functions/sparksql/aggregates/DecimalSumAggregate.h b/velox/functions/sparksql/aggregates/DecimalSumAggregate.h index 2ea6561f66089..4048e5c57742f 100644 --- a/velox/functions/sparksql/aggregates/DecimalSumAggregate.h +++ b/velox/functions/sparksql/aggregates/DecimalSumAggregate.h @@ -130,11 +130,11 @@ class DecimalSumAggregate : public exec::Aggregate { for (auto i = 0; i < numGroups; ++i) { char* group = groups[i]; + clearNull(rawNulls, i); if (isNull(group)) { rawSums[i] = 0; bits::setBit(rawIsEmpty, i, true); } else { - clearNull(rawNulls, i); auto* decimalSum = accumulator(group); bool overflow = false; auto result = (TResultType)computeFinalValue(decimalSum, overflow);