Skip to content

Commit

Permalink
fix sum avg alignment (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiayi771 authored Mar 31, 2023
1 parent 27198b3 commit 4af2ca6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion velox/functions/sparksql/aggregates/DecimalAvgAggregate.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class DecimalAverageAggregate : public exec::Aggregate {
}

int32_t accumulatorAlignmentSize() const override {
return sizeof(LongDecimalWithOverflowState);
return static_cast<int32_t>(sizeof(int128_t));
}

void initializeNewGroups(
Expand Down
2 changes: 1 addition & 1 deletion velox/functions/sparksql/aggregates/DecimalSumAggregate.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class DecimalSumAggregate : public exec::Aggregate {
}

int32_t accumulatorAlignmentSize() const override {
return sizeof(DecimalSum<TAccumulator>);
return static_cast<int32_t>(sizeof(TAccumulator));
}

void initializeNewGroups(
Expand Down

0 comments on commit 4af2ca6

Please sign in to comment.