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

Make it easier to find / work with ByteView #6478

Closed
alamb opened this issue Sep 28, 2024 · 1 comment · Fixed by #6479
Closed

Make it easier to find / work with ByteView #6478

alamb opened this issue Sep 28, 2024 · 1 comment · Fixed by #6479
Assignees
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@alamb
Copy link
Contributor

alamb commented Sep 28, 2024

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
While working with StringViewArray's downstream in DataFusion, I found it was not always clear that ByteView exists for creating/destructuring the u128s so I wanted to write some additional documentation.

While doing so, I also found it quite awkward to write the examples (specifically setting the prefix)

let view = ByteView {
   length: 12,
   // convert 4 byte &str to u32
   prefix: u32::from_le_bytes(prefix.as_bytes().try_into().unwrap()),
   buffer_index: 3,
   offset: 42,
};

Describe the solution you'd like
I would like better documentation and a builder style API

Describe alternatives you've considered

Additional context

@alamb alamb added the enhancement Any new improvement worthy of a entry in the changelog label Sep 28, 2024
@alamb alamb self-assigned this Sep 28, 2024
@alamb alamb added the arrow Changes to the arrow crate label Oct 2, 2024
@alamb
Copy link
Contributor Author

alamb commented Oct 2, 2024

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

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

Successfully merging a pull request may close this issue.

1 participant