On Thu, 10 Jul 2025 17:18:34 -0700
yun zou <yunzou.colost...@gmail.com>
wrote:
> > I think the point was raised previously that hard-coded names were
> > preferred but I don't recall if that was when we were still calling this
> > DayTime?  
> 
> I believe the main concern around naming is focused on whether to
> use *"Duration"* or *"Interval"*, rather than the inclusion of *"Nano"* in
> the type name.
> 
> As for the parameterized time unit, the primary issue seems to be that
> the *physical type size would vary depending on the unit* — for example,
> using int32 for milliseconds and int64 for microseconds. However, it sounds
> like the proposal is to use the same physical type, the unit is just used to
> indicate the type name.

Certainly the latter, IMHO.

> > I do think it's reasonable to parameterize `TimeUnit`
> > for consistency and future proofing but for now we should say it only
> > supports Nanoseconds  
> 
> It feels a bit odd to introduce a parameter when it currently only supports
> a single value.
> An alternative could be to start with a concrete type like *NanoDuration*,
> and if future
> requirements arise, we can consider adding new logical types such as
> *MicroDuration*, etc.
> The disadvantage is that the number of logical type definitions will
> increase along with the units
> we want to support, but I doubt there will be a lot.

The Arrow format supports 64-bit durations of seconds, milliseconds,
microseconds and nanoseconds. It would make sense for Parquet to
roundtrip these types IMHO.

Regards

Antoine.


Reply via email to