You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2024/06/01 10:55:42 UTC
[PR] Convert to local epoch when casting to timestamp without timezone [arrow-rs]
tustvold opened a new pull request, #5831:
URL: https://github.com/apache/arrow-rs/pull/5831
_Draft as I am not sure about this change_
# 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 #5827
# Rationale for this change
<!--
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.
-->
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!---
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
Re: [PR] Convert to local epoch when casting to timestamp without timezone [arrow-rs]
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on code in PR #5831:
URL: https://github.com/apache/arrow-rs/pull/5831#discussion_r1623201864
##########
arrow-cast/src/cast/mod.rs:
##########
@@ -4791,9 +4840,15 @@ mod tests {
let string_array = cast(×tamp_array, &DataType::Utf8).unwrap();
let result = string_array.as_string::<i32>();
- assert_eq!("2000-01-01T00:00:00.123", result.value(0));
- assert_eq!("2010-01-01T00:00:00.123", result.value(1));
+ assert_eq!("2000-01-01T07:00:00.123", result.value(0));
+ assert_eq!("2010-01-01T07:00:00.123", result.value(1));
assert!(result.is_null(2));
+
+ let array = StringArray::from(vec!["2010-01-01T00:00:00.123456+08:00"]);
Review Comment:
We now have a difference in behaviour here, which I think is kind of unfortunate - https://github.com/apache/arrow-rs/pull/4201#discussion_r1192301482
--
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
Re: [PR] Convert to local epoch when casting to timestamp without timezone [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #5831:
URL: https://github.com/apache/arrow-rs/pull/5831#discussion_r1663951785
##########
arrow-cast/src/cast/mod.rs:
##########
@@ -4791,9 +4840,15 @@ mod tests {
let string_array = cast(×tamp_array, &DataType::Utf8).unwrap();
let result = string_array.as_string::<i32>();
- assert_eq!("2000-01-01T00:00:00.123", result.value(0));
- assert_eq!("2010-01-01T00:00:00.123", result.value(1));
+ assert_eq!("2000-01-01T07:00:00.123", result.value(0));
+ assert_eq!("2010-01-01T07:00:00.123", result.value(1));
assert!(result.is_null(2));
+
+ let array = StringArray::from(vec!["2010-01-01T00:00:00.123456+08:00"]);
Review Comment:
To keep the same behavior, would we have to change the string parsing logic too?
--
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
Re: [PR] Convert to local epoch when casting to timestamp without timezone [arrow-rs]
Posted by "devanbenz (via GitHub)" <gi...@apache.org>.
devanbenz commented on PR #5831:
URL: https://github.com/apache/arrow-rs/pull/5831#issuecomment-2335000537
Hi @tustvold is this PR relevant for: https://github.com/apache/datafusion/issues/12218 ? If so I would be happy to take over this to get it across the line. cc @alamb & @findepi
--
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
Re: [PR] Convert to local epoch when casting to timestamp without timezone [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #5831:
URL: https://github.com/apache/arrow-rs/pull/5831#issuecomment-2335143623
> Hi @tustvold is this PR relevant for: [apache/datafusion#12218](https://github.com/apache/datafusion/issues/12218) ? If so I would be happy to take over this to get it across the line. cc @alamb & @findepi
Hi @devanbenz -- thanks for pinging. I think we need to come to some consensus / conclusion that this is the way we want to proceed. I believe there are still some unresolved questions on https://github.com/apache/arrow-rs/issues/5827 that need to be addressed (specifically I believe we also need to agree to update the textual parsing).
Perhaps you can give https://github.com/apache/arrow-rs/issues/5827 a read and post a proposal there to make sure everyone is agreed
--
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
Re: [PR] Convert to local epoch when casting to timestamp without timezone [arrow-rs]
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed pull request #5831: Convert to local epoch when casting to timestamp without timezone
URL: https://github.com/apache/arrow-rs/pull/5831
--
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