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

Only copy strings once #1

Conversation

alamb
Copy link

@alamb alamb commented Jul 8, 2024

Note this targets apache#6004

I think this might be faster because it only copies strings once. Perhaps this is being overly obsessive, but since we are down here anyways let's obsess

@@ -641,8 +643,9 @@ impl ByteViewArrayDecoderDelta {
if bytes.len() > 12 {
// only copy the data to buffer if the string can not be inlined.
array_buffer.extend_from_slice(bytes);
} else {
utf8_validation_buffer.extend_from_slice(bytes);
Copy link
Author

Choose a reason for hiding this comment

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

this only copies the strings once (but then we have to call validate twice on the two different buffers)

Copy link
Owner

Choose a reason for hiding this comment

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

thanks!

@XiangpengHao XiangpengHao merged commit 5a893c9 into XiangpengHao:parquet-string-view-4 Jul 8, 2024
@alamb alamb deleted the alamb/patch-string-view-4 branch July 8, 2024 21:08
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