amol- commented on a change in pull request #11659:
URL: https://github.com/apache/arrow/pull/11659#discussion_r746694386
##########
File path: python/pyarrow/array.pxi
##########
@@ -2360,6 +2360,25 @@ cdef class StructArray(Array):
result.validate()
return result
+ def sort_by(self, fieldname, order="ascending"):
Review comment:
I think it would be resonable to rename the method to `StructArray.sort`
and add it to all Arrays. The signature would be different between them (as in
`StructArray` you have to provide the field argument) but apart from that we
can provide a sort method for all arrays and it would have value as it would
still prevent combining multiple compute functions to achieve the wanted result.
--
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]