viirya commented on code in PR #3155: URL: https://github.com/apache/arrow-rs/pull/3155#discussion_r1031301343
########## arrow-array/src/array/primitive_array.rs: ########## @@ -165,21 +165,48 @@ pub type TimestampMicrosecondArray = PrimitiveArray<TimestampMicrosecondType>; /// A primitive array where each element is of type `TimestampNanosecondType.` /// See examples for [`TimestampSecondArray.`](crate::array::TimestampSecondArray) pub type TimestampNanosecondArray = PrimitiveArray<TimestampNanosecondType>; + +// TODO: give examples for the below types + +/// A primitive array where each element is of 32-bit date type. pub type Date32Array = PrimitiveArray<Date32Type>; +/// A primitive array where each element is of 64-bit date type. pub type Date64Array = PrimitiveArray<Date64Type>; + +/// An array where each element is of 32-bit type representing time elapsed in seconds +/// since midnight. pub type Time32SecondArray = PrimitiveArray<Time32SecondType>; +/// An array where each element is of 32-bit type representing time elapsed in milliseconds +/// since midnight. pub type Time32MillisecondArray = PrimitiveArray<Time32MillisecondType>; +/// An array where each element is of 64-bit type representing time elapsed in microseconds +/// since midnight. pub type Time64MicrosecondArray = PrimitiveArray<Time64MicrosecondType>; +/// An array where each element is of 64-bit type representing time elapsed in nanoseconds +/// since midnight. pub type Time64NanosecondArray = PrimitiveArray<Time64NanosecondType>; + +/// An array where each element is a “calendar” interval in months. pub type IntervalYearMonthArray = PrimitiveArray<IntervalYearMonthType>; +/// An array where each element is a “calendar” interval days and milliseconds. pub type IntervalDayTimeArray = PrimitiveArray<IntervalDayTimeType>; +/// An array where each element is a “calendar” interval in months, days, and nanoseconds. pub type IntervalMonthDayNanoArray = PrimitiveArray<IntervalMonthDayNanoType>; + +/// An array where each element is an elapsed time type in seconds. pub type DurationSecondArray = PrimitiveArray<DurationSecondType>; +/// An array where each element is an elapsed time type in milliseconds. pub type DurationMillisecondArray = PrimitiveArray<DurationMillisecondType>; +/// An array where each element is an elapsed time type in microseconds. pub type DurationMicrosecondArray = PrimitiveArray<DurationMicrosecondType>; +/// An array where each element is an elapsed time type in nanoseconds. pub type DurationNanosecondArray = PrimitiveArray<DurationNanosecondType>; +/// An array where each element is a 128-bits decimal with precision in [1, 38] and +/// scale in [0, 38]. pub type Decimal128Array = PrimitiveArray<Decimal128Type>; +/// An array where each element is a 128-bits decimal with precision in [1, 64] and +/// scale in [0, 64]. Review Comment: ```suggestion /// An array where each element is a 128-bits decimal with precision in [1, 76] and /// scale in [0, 76]. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
