R-JunmingChen commented on code in PR #36977:
URL: https://github.com/apache/arrow/pull/36977#discussion_r1281310530


##########
python/pyarrow/_compute.pyx:
##########
@@ -1933,6 +1933,34 @@ class PartitionNthOptions(_PartitionNthOptions):
         self._set_options(pivot, null_placement)
 
 
+cdef class _CumulativeSumOptions(FunctionOptions):
+    def _set_options(self, start, skip_nulls):
+        if not isinstance(start, Scalar):
+            try:
+                start = lib.scalar(start)
+            except Exception:
+                _raise_invalid_function_option(
+                    start, "`start` type for CumulativeSumOptions", TypeError)
+
+        self.wrapped.reset(new 
CCumulativeOptions(pyarrow_unwrap_scalar(start), skip_nulls))
+
+
+class CumulativeSumOptions(_CumulativeSumOptions):
+    """
+    Options for `cumulative_sum` function.
+
+    Parameters
+    ----------
+    start : Scalar, default 0.0
+        Starting value for sum computation
+    skip_nulls : bool, default False
+        When false, the first encountered null is propagated.
+    """
+
+    def __init__(self, start=0.0, *, skip_nulls=False):
+        self._set_options(start, skip_nulls)
+

Review Comment:
   May be we use alias
   
   `Deprecate_CumulativeSumOptions = _deprecate_class("CumulativeSumOptions", 
CumulativeOptions, 14)` in _compute.py
   
   `Deprecate_CumulativeSumOptions as  CumulativeSumOptions,` in compute.py



-- 
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