lidavidm commented on a change in pull request #12014:
URL: https://github.com/apache/arrow/pull/12014#discussion_r796581517
##########
File path: dev/archery/archery/integration/datagen.py
##########
@@ -221,6 +221,30 @@ def _get_type(self):
('unit', 'DAY' if self.unit == self.DAY else 'MILLISECOND')
])
+ def generate_range(self, size, lower, upper, name=None,
+ include_extremes=False):
+ if self.unit == self.DAY:
+ return super().generate_range(size, lower, upper, name)
+
+ full_day_millis = 1000 * 60 * 60 * 24
+ lower //= full_day_millis
Review comment:
Python appears to round towards -Inf so a lower negative bound that is
not exactly even will get rounded to an out-of-bound value
--
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]