coady opened a new issue, #36118:
URL: https://github.com/apache/arrow/issues/36118

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   ```python
   In []: arr = pa.array(['a', None, 'b'])
   
   In []: pc.sort_indices(arr, [('', 'descending')])
   Out[]: 
   [
     2,
     0,  # 'at_end' means >
     1
   ]
   
   In []: pc.sort_indices(arr, [('', 'descending')], null_placement='at_start')
   Out[]: 
   [
     1,
     2,  # 'at_start' means <
     0
   ]
   
   In []: pc.rank(arr, 'descending')
   Out[]: 
   [
     2,
     3, # literally 'at_end', not >
     1
   ]
   
   In []: pc.rank(arr, 'descending', null_placement='at_start')
   Out[]: 
   [
     3,
     1, # literally 'at_start', not <
     2
   ]
   ```
   
   I guess there is some genuine ambiguity. I'm inclined to think 
`sort_indices` is right because:
   * although the terms are `at_start` and `at_end`, docs also refer to nulls 
being `>`
   * it matches the expectation that `descending` would reverse `ascending`
   
   But either way, it's inconsistent.
   
   ### Component(s)
   
   C++, Python


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