edponce commented on code in PR #12460:
URL: https://github.com/apache/arrow/pull/12460#discussion_r848692381


##########
cpp/src/arrow/compute/api_vector.cc:
##########
@@ -325,6 +342,15 @@ Result<std::shared_ptr<Array>> DropNull(const Array& 
values, ExecContext* ctx) {
   return out.make_array();
 }
 
+// ----------------------------------------------------------------------
+// Cumulative functions
+
+Result<Datum> CumulativeSum(const Datum& values, const CumulativeSumOptions& 
options,
+                            ExecContext* ctx) {
+  auto func_name = (options.check_overflow) ? "cumulative_sum_checked" : 
"cumulative_sum";
+  return CallFunction(func_name, {Datum(values)}, &options, ctx);

Review Comment:
   I agree. This currently mirrors the [API for scalar 
arithmetic](https://github.com/edponce/arrow/blob/master/cpp/src/arrow/compute/api_scalar.cc#L624)
 with the exception that there are no more options.
   The `check_overflow` option is actually only used when invoking via C++ 
public API. If you are using `CallFunction` then `check_overflow` is ignored. 
Also, it leaks into PyArrow.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to