Open
Description
We currently support float and integer numeric measurement types. So to represent a duration, one needs to pick a unit and make that clear somehow. Using an f64
with seconds as the unit is a natural choice, but may not be the easiest to work with. We could support std::time::Duration
s directly, which would remove ambiguity and allow folks to work with whatever scale is natural to their application.
We could convert this to f64
s on the way to / from ClickHouse in seconds; use a fixed precision, say u64
s in nanoseconds; or use the INTERVAL
type. The latter seems like the safest, but it's not clear how well-supported that is on our version of ClickHouse (v22.8.9.24-1).