stuartcarnie opened a new pull request, #5698:
URL: https://github.com/apache/arrow-datafusion/pull/5698
# Which issue does this PR close?
Closes #5697
# Rationale for this change
Teach `date_bin` to support for microsecond and nanosecond precision of
intervals via the `MonthDayNano` type. Note that months are complicated to
support and will require additional work. In doing so, we can also address
#5689.
# What changes are included in this PR?
`date_bin` is now capable of parsing fractional intervals with a precision
of microseconds and greater. The interval parser is also capable of
interpreting the additional units `microsecond`, `microseconds`, `nanosecond`
and `nanoseconds`, which should be additive.
# Are these changes tested?
Yes, unit tests for parsing intervals, validating arguments to `date_bin`
and new SQL tests in the `timestamps.slt` file.
# Are there any user-facing changes?
Yes, users can now use additional units for intervals, such as:
```sql
select date_bin('500 microseconds', ...)
```
and the `date_bin` function is capable of binning microsecond and nanosecond
precision intervals.
--
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]