You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/02/08 18:58:38 UTC

[GitHub] [arrow-rs] alamb opened a new pull request, #3678: Minor: Add some examples to Date*Array and Time*Array

alamb opened a new pull request, #3678:
URL: https://github.com/apache/arrow-rs/pull/3678

   # Which issue does this PR close?
   N/a 
   
   # Rationale for this change
    
   I was a little confused while reviewing https://github.com/apache/arrow-rs/pull/3647 so I wanted to clarify
   
   # What changes are included in this PR?
   Add some examples to the docs
   
   # Are there any user-facing changes?
   
   docs


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] viirya commented on a diff in pull request #3678: Minor: Add some examples to Date*Array and Time*Array

Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya commented on code in PR #3678:
URL: https://github.com/apache/arrow-rs/pull/3678#discussion_r1100614348


##########
arrow-array/src/array/primitive_array.rs:
##########
@@ -168,22 +168,42 @@ pub type TimestampNanosecondArray = PrimitiveArray<TimestampNanosecondType>;
 
 // TODO: give examples for the below types
 
-/// A primitive array where each element is of 32-bit date type.
+/// A primitive array where each element is of 32-bit value
+/// representing the elapsed time since UNIX epoch in days."
+///
+/// This type is similar to the [`chrono::NaiveDate`] type and can hold
+/// values such as `2018-11-13`
 pub type Date32Array = PrimitiveArray<Date32Type>;
-/// A primitive array where each element is of 64-bit date type.
+/// A primitive array where each element is a 64-bit value
+/// representing the elapsed time since the UNIX epoch in milliseconds.
+///
+/// This type is similar to the [`chrono::DateTime`] type and can hold
+/// values such as `2018-11-13T17:11:10.011`
 pub type Date64Array = PrimitiveArray<Date64Type>;
 
 /// An array where each element is of 32-bit type representing time elapsed in seconds
 /// since midnight.
+///
+/// This type is similar to the [`chrono::NaiveTime`] type and can
+/// hold values such as `00:02:00`
 pub type Time32SecondArray = PrimitiveArray<Time32SecondType>;
 /// An array where each element is of 32-bit type representing time elapsed in milliseconds
 /// since midnight.
+///
+/// This type is similar to the [`chrono::NaiveTime`] type and can
+/// hold values such as `00:02:00.123`
 pub type Time32MillisecondArray = PrimitiveArray<Time32MillisecondType>;
 /// An array where each element is of 64-bit type representing time elapsed in microseconds
 /// since midnight.
+///
+/// This type is similar to the [`chrono::NaiveTime`] type and can
+/// hold values such as `00:02:00.000123`
 pub type Time64MicrosecondArray = PrimitiveArray<Time64MicrosecondType>;
 /// An array where each element is of 64-bit type representing time elapsed in nanoseconds
 /// since midnight.
+///
+/// This type is similar to the [`chrono::NaiveTime`] type and can
+/// hold values such as `00:02:00.000000123`

Review Comment:
   ```suggestion
   /// hold values such as `00:02:00.123456789`
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold commented on a diff in pull request #3678: Minor: Add some examples to Date*Array and Time*Array

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on code in PR #3678:
URL: https://github.com/apache/arrow-rs/pull/3678#discussion_r1100571756


##########
arrow-array/src/array/primitive_array.rs:
##########
@@ -168,22 +168,42 @@ pub type TimestampNanosecondArray = PrimitiveArray<TimestampNanosecondType>;
 
 // TODO: give examples for the below types
 
-/// A primitive array where each element is of 32-bit date type.
+/// A primitive array where each element is of 32-bit value
+/// representing the elapsed time since UNIX epoch in days."
+///
+/// This type is similar to the [`chrono::NaiveDate`] type and can hold
+/// values such as `2018-11-13`
 pub type Date32Array = PrimitiveArray<Date32Type>;
-/// A primitive array where each element is of 64-bit date type.
+/// A primitive array where each element is a 64-bit value
+/// representing the elapsed time since the UNIX epoch in milliseconds.
+///
+/// This type is similar to the [`chrono::DateTime`] type and can hold

Review Comment:
   NaiveDateTime perhaps?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] viirya commented on a diff in pull request #3678: Minor: Add some examples to Date*Array and Time*Array

Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya commented on code in PR #3678:
URL: https://github.com/apache/arrow-rs/pull/3678#discussion_r1100613970


##########
arrow-array/src/array/primitive_array.rs:
##########
@@ -168,22 +168,42 @@ pub type TimestampNanosecondArray = PrimitiveArray<TimestampNanosecondType>;
 
 // TODO: give examples for the below types
 
-/// A primitive array where each element is of 32-bit date type.
+/// A primitive array where each element is of 32-bit value
+/// representing the elapsed time since UNIX epoch in days."
+///
+/// This type is similar to the [`chrono::NaiveDate`] type and can hold
+/// values such as `2018-11-13`
 pub type Date32Array = PrimitiveArray<Date32Type>;
-/// A primitive array where each element is of 64-bit date type.
+/// A primitive array where each element is a 64-bit value
+/// representing the elapsed time since the UNIX epoch in milliseconds.
+///
+/// This type is similar to the [`chrono::DateTime`] type and can hold
+/// values such as `2018-11-13T17:11:10.011`
 pub type Date64Array = PrimitiveArray<Date64Type>;
 
 /// An array where each element is of 32-bit type representing time elapsed in seconds
 /// since midnight.
+///
+/// This type is similar to the [`chrono::NaiveTime`] type and can
+/// hold values such as `00:02:00`
 pub type Time32SecondArray = PrimitiveArray<Time32SecondType>;
 /// An array where each element is of 32-bit type representing time elapsed in milliseconds
 /// since midnight.
+///
+/// This type is similar to the [`chrono::NaiveTime`] type and can
+/// hold values such as `00:02:00.123`
 pub type Time32MillisecondArray = PrimitiveArray<Time32MillisecondType>;
 /// An array where each element is of 64-bit type representing time elapsed in microseconds
 /// since midnight.
+///
+/// This type is similar to the [`chrono::NaiveTime`] type and can
+/// hold values such as `00:02:00.000123`

Review Comment:
   ```suggestion
   /// hold values such as `00:02:00.123456`
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] viirya commented on a diff in pull request #3678: Minor: Add some examples to Date*Array and Time*Array

Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya commented on code in PR #3678:
URL: https://github.com/apache/arrow-rs/pull/3678#discussion_r1100614718


##########
arrow-array/src/array/primitive_array.rs:
##########
@@ -168,22 +168,42 @@ pub type TimestampNanosecondArray = PrimitiveArray<TimestampNanosecondType>;
 
 // TODO: give examples for the below types
 
-/// A primitive array where each element is of 32-bit date type.
+/// A primitive array where each element is of 32-bit value
+/// representing the elapsed time since UNIX epoch in days."
+///
+/// This type is similar to the [`chrono::NaiveDate`] type and can hold
+/// values such as `2018-11-13`
 pub type Date32Array = PrimitiveArray<Date32Type>;
-/// A primitive array where each element is of 64-bit date type.
+/// A primitive array where each element is a 64-bit value
+/// representing the elapsed time since the UNIX epoch in milliseconds.
+///
+/// This type is similar to the [`chrono::DateTime`] type and can hold
+/// values such as `2018-11-13T17:11:10.011`
 pub type Date64Array = PrimitiveArray<Date64Type>;
 
 /// An array where each element is of 32-bit type representing time elapsed in seconds
 /// since midnight.
+///
+/// This type is similar to the [`chrono::NaiveTime`] type and can
+/// hold values such as `00:02:00`
 pub type Time32SecondArray = PrimitiveArray<Time32SecondType>;
 /// An array where each element is of 32-bit type representing time elapsed in milliseconds
 /// since midnight.
+///
+/// This type is similar to the [`chrono::NaiveTime`] type and can
+/// hold values such as `00:02:00.123`
 pub type Time32MillisecondArray = PrimitiveArray<Time32MillisecondType>;
 /// An array where each element is of 64-bit type representing time elapsed in microseconds
 /// since midnight.
+///
+/// This type is similar to the [`chrono::NaiveTime`] type and can
+/// hold values such as `00:02:00.000123`
 pub type Time64MicrosecondArray = PrimitiveArray<Time64MicrosecondType>;
 /// An array where each element is of 64-bit type representing time elapsed in nanoseconds
 /// since midnight.
+///
+/// This type is similar to the [`chrono::NaiveTime`] type and can
+/// hold values such as `00:02:00.000000123`

Review Comment:
   easier to read. 😄 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] alamb commented on a diff in pull request #3678: Minor: Add some examples to Date*Array and Time*Array

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #3678:
URL: https://github.com/apache/arrow-rs/pull/3678#discussion_r1100713907


##########
arrow-array/src/array/primitive_array.rs:
##########
@@ -168,22 +168,42 @@ pub type TimestampNanosecondArray = PrimitiveArray<TimestampNanosecondType>;
 
 // TODO: give examples for the below types
 
-/// A primitive array where each element is of 32-bit date type.
+/// A primitive array where each element is of 32-bit value
+/// representing the elapsed time since UNIX epoch in days."
+///
+/// This type is similar to the [`chrono::NaiveDate`] type and can hold
+/// values such as `2018-11-13`
 pub type Date32Array = PrimitiveArray<Date32Type>;
-/// A primitive array where each element is of 64-bit date type.
+/// A primitive array where each element is a 64-bit value
+/// representing the elapsed time since the UNIX epoch in milliseconds.
+///
+/// This type is similar to the [`chrono::DateTime`] type and can hold

Review Comment:
   in a685bf8d3



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] ursabot commented on pull request #3678: Minor: Add some examples to Date*Array and Time*Array

Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #3678:
URL: https://github.com/apache/arrow-rs/pull/3678#issuecomment-1424197281

   Benchmark runs are scheduled for baseline = 0b8c003d03deb3590fcce560effbbc1534be826a and contender = 6ec7226cdcafa9326d7f11a3e421e1e1038ca677. 6ec7226cdcafa9326d7f11a3e421e1e1038ca677 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/cd58c957dd484b9a92057487f17a666d...4cd6f763d3854543807efb24d79464fc/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/402cdd096bec432e92cf5e003c228168...5a5f083e4dac44faae021963722add9d/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/f20d0fc110784881baf8e139e1aba6f2...7f8dc2fdacd04690bd38b537090a548f/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/9d10d102ebb24e1fb5789112c822ca12...4c0149a398f9494384bc604dc6881298/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold merged pull request #3678: Minor: Add some examples to Date*Array and Time*Array

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold merged PR #3678:
URL: https://github.com/apache/arrow-rs/pull/3678


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org