alamb opened a new issue #1066:
URL: https://github.com/apache/arrow-rs/issues/1066


   **Describe the bug**
   As pointed out by @jorgecarleitao  and @b41sh  on 
https://github.com/apache/arrow-rs/pull/779#discussion_r763640120
   
   **To Reproduce**
   Try and sort a `MonthDayNano` array and the ordering will likely be incorrect
   
   For example two rows like `(month, days, nanos)` will be sorted
   ```
   (1, 1, 0),
   (0, 100, 0)
   ```
   
   Even though the second row has 100 days and is longer than the first (a 
single month)
   
   **Expected behavior**
   It is not quite clear to me how arbitrary interval units should be sorted 
(because depending on the exact date, `(1, 0, 0)` and `(0, 30, 0)` will be 
ordered differently (as for example Feburary has 28 days typically and December 
has 31).
   
   The expected behavior may be simply to say "can not sort this array" or 
require the user to provide their own custom `cmp` function where they can 
define how they want the arrays to be sorted. 
   
   **Additional context**
   Add any other context about the problem here.
   


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