Karteek
Karteek
On Presto Java, the decimal average intermediate type is **not BigDecimal** but a **VARBINARY**. The final average step uses BigDecimal to compute total sum and average. The intermediate result is...
@Yuhta Sorry, I should have clarified earlier. The total sum in the intermediate state is a `Slice` of 16 bytes not BigDecimal. Only the final aggregation uses BigDecimal. ``` public...
@Yuhta That is correct. I am working on simple test code on how to achieve this in Velox. We will follow similar approach of Java of tracking the overflow and...
Closing this. An approach similar to JAVA has been implemented here: https://github.com/facebookincubator/velox/pull/2883
@Yuhta Would you please review the PR. Now we are covering partial and intermediate aggregations.
@Yuhta I see that build tests and linter workflows have failed. Is there anything I can help with?
cc: @majetideepak @mbasmanova
> Hi @Joe-Abraham! > > Thank you for your pull request and welcome to our community. > > # Action Required > In order to merge **any pull request** (code,...
@minhancao The linux-adapters job failed. This is likely an alignment issue. ``` int32_t accumulatorAlignmentSize() const override { return 1; } ``` Please override this method: ``` int32_t accumulatorAlignmentSize() const override...
Also, the accumulator internally uses a heap for sorting. This heap allocator must be an aligned allocator: ``` template struct MinMaxNAccumulator { int64_t n{0}; std::vector heapValues; explicit MinMaxNAccumulator(HashStringAllocator* allocator) :...