Open simonvandel opened 1 week ago
I would like to be able to cast a duration to a different timeunit. Current behavior:
DataFusion CLI v39.0.0 > SELECT arrow_cast(1, 'Duration(Millisecond)'); +----------------------------------------------------+ | arrow_cast(Int64(1),Utf8("Duration(Millisecond)")) | +----------------------------------------------------+ | 0 days 0 hours 0 mins 0.001 secs | +----------------------------------------------------+ 1 row(s) fetched. Elapsed 0.065 seconds. > SELECT arrow_cast(arrow_cast(1, 'Duration(Millisecond)'), 'Duration(Second)'); This feature is not implemented: Unsupported CAST from Duration(Millisecond) to Duration(Second)
The cast works
No response
This makes sense -- the easist way would be to add support in the arrow cast kernels
Looks like only Int --> Duration is supported now
https://github.com/apache/arrow-rs/blob/0a4d8a14b58e45ef92e31541f0b51a5b25de5f10/arrow-cast/src/cast/mod.rs#L274-L275
Is your feature request related to a problem or challenge?
I would like to be able to cast a duration to a different timeunit. Current behavior:
Describe the solution you'd like
The cast works
Describe alternatives you've considered
No response
Additional context
No response