@@ -49,6 +49,7 @@ use crate::{
4949 } ,
5050 general:: { GeneralMiniBlockCompressor , GeneralMiniBlockDecompressor } ,
5151 packed:: {
52+ PackedStructFixedPerValueDecompressor , PackedStructFixedPerValueEncoder ,
5253 PackedStructFixedWidthMiniBlockDecompressor ,
5354 PackedStructFixedWidthMiniBlockEncoder , PackedStructVariablePerValueDecompressor ,
5455 PackedStructVariablePerValueEncoder , VariablePackedStructFieldDecoder ,
@@ -732,9 +733,9 @@ impl CompressionStrategy for DefaultCompressionStrategy {
732733 field. children . clone ( ) ,
733734 ) ) )
734735 } else {
735- Err ( Error :: invalid_input (
736- "Packed struct per-value compression should not be used for fixed-width-only structs" ,
737- ) )
736+ Ok ( Box :: new ( PackedStructFixedPerValueEncoder :: new (
737+ field . children . clone ( ) ,
738+ ) ) )
738739 }
739740 }
740741 DataBlock :: VariableWidth ( variable_width) => {
@@ -1008,6 +1009,9 @@ impl DecompressionStrategy for DefaultDecompressionStrategy {
10081009 ) ) ) ,
10091010 Compression :: Flat ( flat) => Ok ( Box :: new ( ValueDecompressor :: from_flat ( flat) ) ) ,
10101011 Compression :: FixedSizeList ( fsl) => Ok ( Box :: new ( ValueDecompressor :: from_fsl ( fsl) ) ) ,
1012+ Compression :: PackedStruct ( description) => Ok ( Box :: new (
1013+ PackedStructFixedPerValueDecompressor :: new ( description) ?,
1014+ ) ) ,
10111015 _ => todo ! ( "fixed-per-value decompressor for {:?}" , description) ,
10121016 }
10131017 }
0 commit comments