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

Add FSST encoding #645

Merged
merged 6 commits into from
Aug 19, 2024
Merged

Add FSST encoding #645

merged 6 commits into from
Aug 19, 2024

Conversation

a10y
Copy link
Contributor

@a10y a10y commented Aug 16, 2024

This is just the FSSTArray, leaning on the shiny new fsst-rs crate we're publishing.

This does not implement the encoding compressor, will do that in a follow-on.

encodings/fsst/src/array.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@AdamGS AdamGS left a comment

Choose a reason for hiding this comment

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

overall LGTM, excited to see this work integrated into the sampling compressor

Comment on lines 68 to 80
if matches!(self.dtype(), &DType::Utf8(_)) {
// SAFETY: a UTF-8 FSSTArray can only be compressed from a known-good UTF-8 array, no need to revalidate.
let buffer_string = unsafe { BufferString::new_unchecked(decoded_buffer) };
Ok(Scalar::new(
self.dtype().clone(),
ScalarValue::BufferString(buffer_string),
))
} else {
Ok(Scalar::new(
self.dtype().clone(),
ScalarValue::Buffer(decoded_buffer),
))
}
Copy link
Member

Choose a reason for hiding this comment

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

there's a varbin_scalar function in VarBinArray which I think does the same thing

@a10y a10y enabled auto-merge (squash) August 19, 2024 14:23
@a10y a10y merged commit cfd0943 into develop Aug 19, 2024
4 checks passed
@a10y a10y deleted the aduffy/fsst-v0 branch August 19, 2024 14:44
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.

3 participants