wesm commented on PR #12460:
URL: https://github.com/apache/arrow/pull/12460#issuecomment-1159026036

   I'm refactoring all the vector kernels and I observed that the behavior of 
this kernel is inconsistent between scalar and array inputs:
   
   A scalar null returns an array of length with 0 while an array with a single 
null returns an array with one null
   
   ```
   In [5]: pc.cumulative_sum(pa.array([None], type='int32')[0], skip_nulls=True)
   Out[5]: 
   <pyarrow.lib.Int32Array object at 0x7fa80d3e7640>
   [
     0
   ]
   
   In [6]: pc.cumulative_sum(pa.array([None], type='int32'), skip_nulls=True)
   Out[6]: 
   <pyarrow.lib.Int32Array object at 0x7fa80d3e7700>
   [
     null
   ]
   ```
   
   I'm not sure this is right -- I can preserve this behavior, but do we want 
to fix it? 


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