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

Support Numeric -> Utf8View casting #6714

Open
Omega359 opened this issue Nov 11, 2024 · 1 comment · May be fixed by #6719
Open

Support Numeric -> Utf8View casting #6714

Omega359 opened this issue Nov 11, 2024 · 1 comment · May be fixed by #6719
Assignees
Labels
enhancement Any new improvement worthy of a entry in the changelog

Comments

@Omega359
Copy link
Contributor

Describe the bug

Casting from i32 to utf8View is not currently supported

To Reproduce

#[test]
    fn test_cast_i32_to_utf8view() {
        let array = Int32Array::from(vec![5, 6, 7, 8, 9]);
        let b = cast(&array, &DataType::Utf8View).unwrap();
        let c = b.as_any().downcast_ref::<StringViewArray>().unwrap();
        assert_eq!("5", c.value(0));
        assert_eq!("6", c.value(1));
        assert_eq!("7", c.value(2));
        assert_eq!("8", c.value(3));
        assert_eq!("9", c.value(4));
    }

Expected behavior

Casting from i32 to utf8view arrays is supported.

Additional context

@tlm365
Copy link
Contributor

tlm365 commented Nov 11, 2024

take

@Omega359 Omega359 changed the title Support i32 -> Utf8View casting Support Numeric -> Utf8View casting Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants