You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/11 03:04:00 UTC

[GitHub] [arrow-rs] src255 opened a new pull request, #3088: Issue 3042

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

   # Which issue does this PR close?
    
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #3042
    
   <!--
   Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
   Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
   -->
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   The `with_timezone_utc` method is implemented with the timezone `"+00:00"`. Two leading zeros are used for consistency with non-zero offsets. Also, the signature of `with_timezone` has been changed:
   ```rust
   // pub fn with_timezone(&self, timezone: String) -> Self {/* --snip-- */}
   pub fn with_timezone(&self, timezone: impl Into<String>) -> Self {/* --snip-- */}
   ```
   
   # Are there any user-facing changes?
   
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   The `with_timezone` now accepts `&str` in addition to `String`. For example,
   ```rust
   let arr1: PrimitiveArray<TimestampMillisecondType> =
       TimestampMillisecondArray::from(vec![
           1546214400000,
           -1546214400000,
       ])
   //  .with_timezone("+00:00".to_string());
      .with_timezone("+00:00");
   
   let arr2: PrimitiveArray<TimestampMillisecondType> =
       TimestampMillisecondArray::from(vec![
           1546214400000,
           -1546214400000,
       ])
       .with_timezone_utc();
   
   assert_eq!(
       format!("{:?}", arr1),
       format!("{:?}", arr2)
   );
   ```
   
   <!---
   If there are any breaking changes to public APIs, please add the `breaking change` label.
   -->
   


-- 
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 #3088: Issue 3042

Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #3088:
URL: https://github.com/apache/arrow-rs/pull/3088#discussion_r1020237341


##########
arrow-array/src/array/primitive_array.rs:
##########
@@ -779,8 +779,13 @@ impl<T: ArrowTimestampType> PrimitiveArray<T> {
     }
 
     /// Construct a timestamp array with new timezone
-    pub fn with_timezone(&self, timezone: String) -> Self {
-        self.with_timezone_opt(Some(timezone))
+    pub fn with_timezone(&self, timezone: impl Into<String>) -> Self {

Review Comment:
   ❤️ 



-- 
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 pull request #3088: Improved UX of creating `TimestampNanosecondArray` with timezones

Posted by GitBox <gi...@apache.org>.
alamb commented on PR #3088:
URL: https://github.com/apache/arrow-rs/pull/3088#issuecomment-1312460707

   Great team effort 👍 


-- 
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] src255 commented on pull request #3088: Improved UX of creating `TimestampNanosecondArray` with timezones

Posted by GitBox <gi...@apache.org>.
src255 commented on PR #3088:
URL: https://github.com/apache/arrow-rs/pull/3088#issuecomment-1312332475

   @tustvold Thank you for resolving the merge conflicts, I really appreciate it!


-- 
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 #3088: Improved UX of creating `TimestampNanosecondArray` with timezones

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #3088:
URL: https://github.com/apache/arrow-rs/pull/3088#issuecomment-1312084993

   Benchmark runs are scheduled for baseline = 02a3f5cd24ef586cdf57af1f06cad662a094a9af and contender = 561f63a232843fb36486f139faa9249652a5053c. 561f63a232843fb36486f139faa9249652a5053c 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/9de06dfa8fb84578afc548436cf305d8...3096f8bc42c8472ab3c9922f24dca37c/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/18b0f6a7667d4eac95619990da1c34e5...83fcebd9ba4e431e9d9c00f2dbc27143/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/becc04ec9398488fa60fd31a64669cf9...c1ab6e72f2e148b496e294246d9485b5/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/f1e95f61174c4283929e1a18adef9500...bb107b0e7a024b75a7e62bbb23d7e589/)
   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 commented on pull request #3088: Improved UX of creating `TimestampNanosecondArray` with timezones

Posted by GitBox <gi...@apache.org>.
tustvold commented on PR #3088:
URL: https://github.com/apache/arrow-rs/pull/3088#issuecomment-1312071416

   I took the liberty of resolving the merge conflicts on this


-- 
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 #3088: Improved UX of creating `TimestampNanosecondArray` with timezones

Posted by GitBox <gi...@apache.org>.
tustvold merged PR #3088:
URL: https://github.com/apache/arrow-rs/pull/3088


-- 
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] waitingkuo commented on a diff in pull request #3088: Improved UX of creating `TimestampNanosecondArray` with timezones

Posted by GitBox <gi...@apache.org>.
waitingkuo commented on code in PR #3088:
URL: https://github.com/apache/arrow-rs/pull/3088#discussion_r1020749749


##########
arrow-array/src/array/primitive_array.rs:
##########
@@ -779,8 +779,13 @@ impl<T: ArrowTimestampType> PrimitiveArray<T> {
     }
 
     /// Construct a timestamp array with new timezone
-    pub fn with_timezone(&self, timezone: String) -> Self {
-        self.with_timezone_opt(Some(timezone))
+    pub fn with_timezone(&self, timezone: impl Into<String>) -> Self {

Review Comment:
   Thank you @src255 @alamb 



-- 
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