Skip to content

Commit

Permalink
move clearNull
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiayi771 committed Oct 28, 2023
1 parent 27986d7 commit 78d847a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion velox/functions/sparksql/aggregates/DecimalSumAggregate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 78d847a

Please sign in to comment.