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

Add tests and examples for UnionArray::from(data: ArrayData) #1643

Closed
HaoYang670 opened this issue May 4, 2022 · 1 comment
Closed

Add tests and examples for UnionArray::from(data: ArrayData) #1643

HaoYang670 opened this issue May 4, 2022 · 1 comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@HaoYang670
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
There is no test or example covering UnionArray::from(data: ArrayData). We need to add some.

impl From<ArrayData> for UnionArray {
    fn from(data: ArrayData) -> Self {
        let mut boxed_fields = vec![];
        for cd in data.child_data() {
            boxed_fields.push(make_array(cd.clone()));
        }
        Self { data, boxed_fields }
    }
}
@HaoYang670 HaoYang670 added the enhancement Any new improvement worthy of a entry in the changelog label May 4, 2022
@HaoYang670
Copy link
Contributor Author

I have found the function is used in try_new which has been tested. So close this issue.

@alamb alamb added the arrow Changes to the arrow crate label May 12, 2022
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 enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

No branches or pull requests

2 participants