Closed as not planned
Description
datetime.time
only supports microsecond precision.
Similarly, the BigQuery TIME data type only returns microsecond precision.
The pandas convention is to use nanosecond precision for timestamps via the pandas.Timestamp class. It may make sense for this extension dtype to also support this.
Subtasks:
- Preserve nanoseconds when we are given them in the data (e.g. from numpy array or pyarrow array).
- Add unit as an optional argument in the dtype constructor, similar to https://github.com/pandas-dev/pandas/blob/1c986d6213904fd7d9acc5622dc91d029d3f1218/pandas/core/dtypes/dtypes.py#L777 -- Note: maybe unnecessary since we always store as nanoseconds, but could be useful as a box/unbox hint (see below)
- Return / accept something other than
datetime.time
that supports nanoseconds instead of only microsecond precision. This is similar todatetime.datetime
versuspandas.Timestamp
.