You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be fairly straightforward to port (along with tests) to arrow-rs
I don't think arrow should have the logic that tries to auto-detect the type of the interval -- in DataFusion I think we could simply change the code to try parsing the string as different types of intervals and use the one that first succeeds.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In DataFusion, we support SQL syntax like
INTERVAL 3 months
that is then converted intoIntervals
(I think originally contributed by @ovr).However we currently only support converting individual values (rather than arrays)
Describe the solution you'd like
I would like the arrow cast kernel https://docs.rs/arrow-cast/32.0.0/arrow_cast/cast/fn.cast.html to support casting to/from strings and intervals
DataType::Interval(_)
<---->DataType::Utf8/DataType::LargeUtf8
There is some subtlety related to parsing intervals (like if a given interval type can fit a specific range and precision)
Describe alternatives you've considered
Additional context
The datafusion parse_interval logic is here: https://github.com/apache/arrow-datafusion/blob/1f7885bb48dd33ce7b9df995214393bbff080e08/datafusion/common/src/parsers.rs#L115-L266
I think it would be fairly straightforward to port (along with tests) to arrow-rs
I don't think arrow should have the logic that tries to auto-detect the type of the interval -- in DataFusion I think we could simply change the code to try parsing the string as different types of intervals and use the one that first succeeds.
The text was updated successfully, but these errors were encountered: