Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
jdcasale committed Apr 22, 2024
1 parent 4289bd1 commit 86a0a0f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vortex-alp/src/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ impl EncodingCompression for ALPEncoding {
ctx: CompressCtx,
) -> VortexResult<Array<'static>> {
let like_alp = like.map(|like_array| like_array.as_array_ref());
let exponents_cloned = like
.map(|like_array| ALPArray::try_from(like_array).unwrap())
.as_ref()
.map(|a| a.exponents().clone());

// TODO(ngates): fill forward nulls
let parray = array.clone().flatten_primitive()?;

let (exponents, encoded, patches) = match_each_alp_float_ptype!(
parray.ptype(), |$T| {
encode_to_array::<$T>(&parray, None)
encode_to_array::<$T>(&parray, exponents_cloned.as_ref())
})?;

let compressed_encoded = ctx
Expand Down

0 comments on commit 86a0a0f

Please sign in to comment.