roboto.formats.parquet.timestamp#
Module Contents#
- class roboto.formats.parquet.timestamp.Timestamp#
Timestamp signal in a Parquet field. Serves as both a descriptor of that signal and as a utility for projecting it to other time units.
Note
This is not intended as a public API.
- field: pyarrow.Field#
- to_epoch_nanoseconds(timestamp)#
- Parameters:
timestamp (roboto.time.Time)
- Return type:
int
- unit()#
- Return type:
- unit_hint: str | None#
Unit the stored values are recorded in, used when the Arrow type does not carry one.
Sourced from the field’s metadata (old model) or its first-class unit (new model) at the bounded-context boundary.
Nonewhen the unit is unknown.
- class roboto.formats.parquet.timestamp.TimestampInfo#
- end_time: int | float | datetime.datetime | None#
- end_time_ns()#
- Return type:
Optional[int]
- field: pyarrow.Field#
- start_time: int | float | datetime.datetime | None#
- start_time_ns()#
- Return type:
Optional[int]
- unit: roboto.time.TimeUnit#
- roboto.formats.parquet.timestamp.is_timestamp_like(arrow_type)#
- Parameters:
arrow_type (pyarrow.DataType)
- Return type:
bool
- roboto.formats.parquet.timestamp.is_timezone_aware(arrow_type)#
- Parameters:
arrow_type (pyarrow.DataType)
- Return type:
bool
- roboto.formats.parquet.timestamp.time_unit_from_timestamp_type(timestamp_type)#
- Parameters:
timestamp_type (pyarrow.TimestampType)
- Return type: