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

Minor: Document pattern for accessing views in StringView #6673

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Nov 2, 2024

Which issue does this PR close?

Closes #.

Rationale for this change

While reviewing #6671 (review) from @austin362667 I got nerdsniped trying to find documentation on how to work with the views of the StringView

What changes are included in this PR?

  1. Improve documentation for GenericByteViewArray
  2. Add example of how to work with u128 views

Are there any user-facing changes?

Better docs. No functional changes

@alamb alamb marked this pull request as ready for review November 2, 2024 10:59
@github-actions github-actions bot added the arrow Changes to the arrow crate label Nov 2, 2024
Copy link
Contributor

@jayzhan211 jayzhan211 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@austin362667 austin362667 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's really nice! Much appreciate it @alamb 👍

Comment on lines +59 to +60
/// Comparing two `GenericByteViewArray` using PartialEq compares by structure
/// (the `u128`s) and contents of the buffers, not by logical content. As there
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this is a bug, the other array data equality implementations compute logical equality

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #6679

Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although I think the PartialEq situation is a bug that should be fixed

@alamb alamb added the documentation Improvements or additions to documentation label Nov 4, 2024
@alamb alamb merged commit db663d8 into apache:master Nov 4, 2024
26 checks passed
@alamb
Copy link
Contributor Author

alamb commented Nov 4, 2024

LGTM, although I think the PartialEq situation is a bug that should be fixed

Tracked in #6679

@alamb alamb deleted the alamb/document_string_view_length branch November 4, 2024 20:13
@alamb
Copy link
Contributor Author

alamb commented Nov 4, 2024

Thank you for the reviews @austin362667 @tustvold and @jayzhan211

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 documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants