Open killme2008 opened 1 week ago
I am interested in this issue and would like to try to implement it.
Frankly speaking I already did a draft, but happy to step away @leaf-potato!
Fill free to ping me in case of questions as very likely you are going to extend the expand_interval.rs
.
@killme2008 a quick question do you expect an output something like
SELECT INTERVAL 'P3Y3M700DT133H17M36.789S';
+-------------------------------------------------------------+
| IntervalMonthDayNano("163343856789000000") |
+-------------------------------------------------------------+
| 0 years 0 mons 0 days 45373 hours 17 mins 36.789000000 secs |
+-------------------------------------------------------------+
or it should be the exact match of years/months/days etc?
@killme2008 a quick question do you expect an output something like
Yes, it's exactly what we need.
Hey @leaf-potato Just curious if you had time to take a look at this ticket?
What type of enhancement is this?
API improvement, User experience
What does the enhancement do?
Unfortunately, GreptimeDB doesn't support writing the interval in the format of ISO 8601 time intervals such as
P3Y3M700DT133H17M36.789S
etc. But it's output supports it.But I think we can support it by the transform rules too just like #4182
This lib looks helpful: https://docs.rs/iso8601/latest/iso8601/
Using the
Duration::from_str(s)
to parse the interval.https://docs.rs/iso8601/latest/iso8601/enum.Duration.html
Implementation challenges
No response