Skip to content

Commit 4af2ca6

Browse files
authored
fix sum avg alignment (#172)
1 parent 27198b3 commit 4af2ca6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

velox/functions/sparksql/aggregates/DecimalAvgAggregate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class DecimalAverageAggregate : public exec::Aggregate {
3636
}
3737

3838
int32_t accumulatorAlignmentSize() const override {
39-
return sizeof(LongDecimalWithOverflowState);
39+
return static_cast<int32_t>(sizeof(int128_t));
4040
}
4141

4242
void initializeNewGroups(

velox/functions/sparksql/aggregates/DecimalSumAggregate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class DecimalSumAggregate : public exec::Aggregate {
4242
}
4343

4444
int32_t accumulatorAlignmentSize() const override {
45-
return sizeof(DecimalSum<TAccumulator>);
45+
return static_cast<int32_t>(sizeof(TAccumulator));
4646
}
4747

4848
void initializeNewGroups(

0 commit comments

Comments
 (0)