Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast to timestamp with time zone returns timestamp #3800

Closed
comphead opened this issue Mar 3, 2023 · 2 comments · Fixed by #3806
Closed

Cast to timestamp with time zone returns timestamp #3800

comphead opened this issue Mar 3, 2023 · 2 comments · Fixed by #3806
Labels
arrow Changes to the arrow crate bug

Comments

@comphead
Copy link
Contributor

comphead commented Mar 3, 2023

Describe the bug

Cast to timestamp with time zone returns timestamp

To Reproduce


    #[test]
    fn test_cast_utf8_to_timestamptz() {
            let valid = StringArray::from(vec![
                "2023-01-01",
            ]);

            let array = Arc::new(valid) as ArrayRef;
            let b = cast(&array, &DataType::Timestamp(TimeUnit::Nanosecond, Some("+00:00".to_owned())))
                .unwrap();

            dbg!(&b);

    }

[arrow-cast/src/cast.rs:7653] &b = PrimitiveArray<Timestamp(Nanosecond, None)>
[
  2023-01-01T00:00:00,
]

Expected behavior

The return type has to be

PrimitiveArray<Timestamp(Nanosecond, Some("+00:00"))>

Additional context

@comphead comphead added the bug label Mar 3, 2023
@comphead
Copy link
Contributor Author

comphead commented Mar 3, 2023

Probably related to #1936

@tustvold
Copy link
Contributor

label_issue.py automatically added labels {'arrow'} from #3806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants