-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add FSST encoding #645
Conversation
There was a problem hiding this 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
encodings/fsst/src/compute.rs
Outdated
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), | ||
)) | ||
} |
There was a problem hiding this comment.
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
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.