Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions rust/lance-encoding/src/compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ use crate::{
},
general::{GeneralMiniBlockCompressor, GeneralMiniBlockDecompressor},
packed::{
PackedStructFixedPerValueDecompressor, PackedStructFixedPerValueEncoder,
PackedStructFixedWidthMiniBlockDecompressor,
PackedStructFixedWidthMiniBlockEncoder, PackedStructVariablePerValueDecompressor,
PackedStructVariablePerValueEncoder, VariablePackedStructFieldDecoder,
Expand Down Expand Up @@ -770,9 +771,9 @@ impl CompressionStrategy for DefaultCompressionStrategy {
field.children.clone(),
)))
} else {
Err(Error::invalid_input(
"Packed struct per-value compression should not be used for fixed-width-only structs",
))
Ok(Box::new(PackedStructFixedPerValueEncoder::new(
field.children.clone(),
)))
}
}
DataBlock::VariableWidth(variable_width) => {
Expand Down Expand Up @@ -1043,6 +1044,9 @@ impl DecompressionStrategy for DefaultDecompressionStrategy {
))),
Compression::Flat(flat) => Ok(Box::new(ValueDecompressor::from_flat(flat))),
Compression::FixedSizeList(fsl) => Ok(Box::new(ValueDecompressor::from_fsl(fsl))),
Compression::PackedStruct(description) => Ok(Box::new(
PackedStructFixedPerValueDecompressor::new(description)?,
)),
_ => todo!("fixed-per-value decompressor for {:?}", description),
}
}
Expand Down
8 changes: 0 additions & 8 deletions rust/lance-encoding/src/encodings/logical/primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5463,14 +5463,6 @@ impl PrimitiveStructuralEncoder {
variable.bits_per_offset
))
}
DataBlock::Struct(struct_data_block)
if !struct_data_block.has_variable_width_child() =>
{
Some(
"Full-zip packed struct requires at least one variable-width child"
.to_string(),
)
}
DataBlock::Dictionary(_) => {
Some("Full-zip does not encode dictionary data blocks directly".to_string())
}
Expand Down
Loading
Loading