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

Implement ViewBinaryViewArrayAsBytes #709

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

WillAyd
Copy link
Contributor

@WillAyd WillAyd commented Jan 29, 2025

Closes #633

@WillAyd WillAyd marked this pull request as draft January 29, 2025 21:27
@WillAyd WillAyd force-pushed the asbytes-view-iterator branch from 9e3d004 to bbcea42 Compare January 29, 2025 23:19
@WillAyd WillAyd marked this pull request as ready for review January 29, 2025 23:30
Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

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

Two comments for consideration. Thank you!

EXPECT_EQ(slot, expected[i]);
}
++i;
}
Copy link
Member

Choose a reason for hiding this comment

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

Should you increment the offset here and test again to make sure the offset is applied correctly? (I'm always paranoid that something isn't taking into account an offset 🙂 )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice idea - added some parametrization for that

@@ -234,6 +234,60 @@ class ViewArrayAsBytes {
value_type operator[](int64_t i) const { return range_.get(i); }
};

class ViewBinaryViewArrayAsBytes {
Copy link
Member

Choose a reason for hiding this comment

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

Should this be ViewBinaryArray*View*AsBytes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so (?) Following the pattern of the other classes, they are all ArrayAs... even though they accept an array view in the constructor

Copy link
Member

Choose a reason for hiding this comment

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

Got it!

@WillAyd WillAyd merged commit 76fb7ee into apache:main Jan 30, 2025
36 checks passed
@WillAyd WillAyd deleted the asbytes-view-iterator branch January 30, 2025 18:00
@WillAyd
Copy link
Contributor Author

WillAyd commented Jan 30, 2025

Thanks @paleolimbot for the review

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.

ViewArrayAsBytes Specializations for Binary View Types
2 participants