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

Adding Vec<u8> conversion #387

Merged
merged 5 commits into from
Dec 8, 2023
Merged

Adding Vec<u8> conversion #387

merged 5 commits into from
Dec 8, 2023

Conversation

haixuanTao
Copy link
Collaborator

@haixuanTao haixuanTao commented Dec 1, 2023

Some people might not know how to go from ArrayData to ArrowData using the make_array and to_data method.

This conversion makes it simpler.

It also add a way to quickly get a Vec<u8>.

Example:

                    let a: Vec<u8> = vec![1];
                    let b = ArrowData::from(a.into_arrow().into_data());
                    let c: &[u8] = (&b).try_into()?;

libraries/arrow-convert/src/from_impls.rs Outdated Show resolved Hide resolved
libraries/arrow-convert/src/from_impls.rs Outdated Show resolved Hide resolved
libraries/arrow-convert/src/from_impls.rs Outdated Show resolved Hide resolved
@phil-opp phil-opp changed the title Adding conversion from ArrayData for simpler conversion and adding Vec<u8> conversion Adding Vec<u8> conversion Dec 8, 2023
@phil-opp phil-opp enabled auto-merge December 8, 2023 15:32
@phil-opp phil-opp merged commit a7244f0 into main Dec 8, 2023
17 checks passed
@phil-opp phil-opp deleted the simpler-conversion branch December 8, 2023 16:38
@haixuanTao haixuanTao mentioned this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants