rok commented on PR #12528:
URL: https://github.com/apache/arrow/pull/12528#issuecomment-1140040492

   I've added Python tests to test the C++ implementation. Here are some 
visualisations of current behaviour:
   
![image](https://user-images.githubusercontent.com/54589/170787653-c8258af5-9e46-496f-8f1a-001161908391.png)
   
![image](https://user-images.githubusercontent.com/54589/170787676-757efed9-9852-45ea-bd33-7da30f153aac.png)
   
   And here's the Jupyter notebook used to generate visualisations: 
https://gist.github.com/rok/95140c58b4e516508866cf1367071e81
   
   @jorisvandenbossche adding `roll-forward/backward` [like 
clock](https://clock.r-lib.org/reference/posixt-rounding.html) might be a good 
idea. I don't like `shift-forward/backward` so much. We previously dismissed 
having multiple settings though. However it might be worth to reopened that to 
enable sortedness-maintaining and sortedness-destroying behaviour. Possible 
options:
   * Real local rounding (sortedness-destroying), currently implemented
   * roll-forward/backward (sortedness-maintaining)
   * NA
   * Throw error
   
   Please also note current behaviour has some odd jitter due to rounding from 
different offsets, see around 1am below:
   
![image](https://user-images.githubusercontent.com/54589/170789181-0434c5e7-8353-457a-b9fa-811f262d2461.png)
   I'm not sure there is an obvious way to address 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