You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/22 06:18:45 UTC

[GitHub] [arrow] vibhatha commented on a diff in pull request #13412: ARROW-16865: [C++][Python] Implement cumulative product, max, and min compute functions

vibhatha commented on code in PR #13412:
URL: https://github.com/apache/arrow/pull/13412#discussion_r903323137


##########
cpp/src/arrow/compute/api_vector.cc:
##########
@@ -383,6 +401,14 @@ Result<Datum> CumulativeSum(const Datum& values, const CumulativeSumOptions& opt
   return CallFunction(func_name, {Datum(values)}, &options, ctx);
 }
 
+Result<Datum> CumulativeProduct(const Datum& values,
+                                const CumulativeProductOptions& options,
+                                ExecContext* ctx) {
+  auto func_name =
+      (options.check_overflow) ? "cumulative_product_checked" : "cumulative_product";
+  return CallFunction(func_name, {Datum(values)}, &options, ctx);

Review Comment:
   May be
   
   ```suggestion
     return CallFunction(
         options.check_overflow ? "cumulative_sum_checked" : "cumulative_sum",
         {Datum(values)}, &options, ctx);
   ```



-- 
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-unsubscribe@arrow.apache.org

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