zanmato1984 commented on code in PR #44184:
URL: https://github.com/apache/arrow/pull/44184#discussion_r2074681131


##########
cpp/src/arrow/compute/kernels/aggregate_basic.cc:
##########
@@ -365,11 +365,16 @@ struct ProductImpl : public ScalarAggregator {
   }
 
   Status Finalize(KernelContext*, Datum* out) override {
+    std::shared_ptr<DataType> out_type_ = this->out_type;
+    if (is_decimal(this->out_type->id())) {
+      ARROW_ASSIGN_OR_RAISE(out_type_, 
WidenDecimalToMaxPrecision(this->out_type));
+    }
+

Review Comment:
   > The link you have is to a different commit, I believe. If you look at 
those lines in this PR they do change the type at resolution time.
   
   Ah, I see changing the output type in resolution time. Thanks for clarifying.
   
   Then the question is why changing the output type again during the 
execution, which I think you are figuring out :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to