pub struct TimestampWithOffset;Expand description
The extension type for TimestampWithOffset.
Extension name: arrow.timestamp_with_offset.
This type represents a timestamp column that stores potentially different timezone offsets per
value. The timestamp is stored in UTC alongside the original timezone offset in minutes. This
extension type is intended to be compatible with ANSI SQL’s TIMESTAMP WITH TIME ZONE, which
is supported by multiple database engines.
The storage type of the extension is a Struct with 2 fields, in order: - timestamp: a
non-nullable Timestamp(time_unit, "UTC"), where time_unit is any Arrow TimeUnit (s, ms,
us or ns). - offset_minutes: a non-nullable signed 16-bit integer (Int16) representing the
offset in minutes from the UTC timezone. Negative offsets represent time zones west of UTC,
while positive offsets represent east. Offsets normally range from -779 (-12:59) to +780
(+13:00).
This type has no type parameters.
Metadata is either empty or an empty string.
It is also permissible for the offset_minutes field to be dictionary-encoded with a
preferred (but not required) index type of int8, or run-end-encoded with a preferred (but
not required) runs type of int8.
It’s worth noting that the data source needs to resolve timezone strings such as UTC or
Americas/Los_Angeles into an offset in minutes in order to construct a TimestampWithOffset.
This makes TimestampWithOffset type “lossy” in the sense that any original “unresolved”
timezone string gets lost in this conversion. It’s a tradeoff for optimizing the row
representation and simplifying the client code, which does not need to know how to convert from
timezone string to its corresponding offset in minutes.
https://arrow.apache.org/docs/format/CanonicalExtensions.html#timestamp-with-offset
Trait Implementations§
Source§impl Clone for TimestampWithOffset
impl Clone for TimestampWithOffset
Source§fn clone(&self) -> TimestampWithOffset
fn clone(&self) -> TimestampWithOffset
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TimestampWithOffset
impl Debug for TimestampWithOffset
Source§impl Default for TimestampWithOffset
impl Default for TimestampWithOffset
Source§fn default() -> TimestampWithOffset
fn default() -> TimestampWithOffset
Source§impl ExtensionType for TimestampWithOffset
impl ExtensionType for TimestampWithOffset
Source§const NAME: &'static str = "arrow.timestamp_with_offset"
const NAME: &'static str = "arrow.timestamp_with_offset"
Source§fn metadata(&self) -> &Self::Metadata
fn metadata(&self) -> &Self::Metadata
&() if
if this extension type defines no metadata (Self::Metadata=()).Source§fn serialize_metadata(&self) -> Option<String>
fn serialize_metadata(&self) -> Option<String>
None if this extension type defines no metadata
(Self::Metadata=()). Read moreSource§fn deserialize_metadata(
metadata: Option<&str>,
) -> Result<Self::Metadata, ArrowError>
fn deserialize_metadata( metadata: Option<&str>, ) -> Result<Self::Metadata, ArrowError>
None for the serialized metadata and return
Ok(()). Read moreSource§fn supports_data_type(&self, data_type: &DataType) -> Result<(), ArrowError>
fn supports_data_type(&self, data_type: &DataType) -> Result<(), ArrowError>
Ok(()) iff the given data type is supported by this extension
type.