From d8f66ba07e0a5894e60e322dcb5d75368216ea6d Mon Sep 17 00:00:00 2001 From: Paul Masurel Date: Thu, 25 Aug 2022 18:19:30 +0200 Subject: [PATCH] Rename fastfield codecs (#1483) --- fastfield_codecs/benches/bench.rs | 20 ++++++------ fastfield_codecs/src/bitpacked.rs | 24 +++++++------- fastfield_codecs/src/blockwise_linear.rs | 19 ++++++----- fastfield_codecs/src/lib.rs | 40 +++++++++++------------- fastfield_codecs/src/linear.rs | 14 ++++----- fastfield_codecs/src/main.rs | 12 +++---- src/fastfield/multivalued/writer.rs | 4 +-- src/fastfield/reader.rs | 31 ++++++++---------- src/fastfield/serializer/mod.rs | 34 ++++++++------------ 9 files changed, 87 insertions(+), 111 deletions(-) diff --git a/fastfield_codecs/benches/bench.rs b/fastfield_codecs/benches/bench.rs index b62db6be2f..8afe5d9732 100644 --- a/fastfield_codecs/benches/bench.rs +++ b/fastfield_codecs/benches/bench.rs @@ -4,11 +4,9 @@ extern crate test; #[cfg(test)] mod tests { - use fastfield_codecs::bitpacked::{BitpackedFastFieldReader, BitpackedFastFieldSerializer}; - use fastfield_codecs::blockwise_linear::{ - BlockwiseLinearFastFieldReader, BlockwiseLinearFastFieldSerializer, - }; - use fastfield_codecs::linear::{LinearFastFieldReader, LinearFastFieldSerializer}; + use fastfield_codecs::bitpacked::{BitpackedReader, BitpackedSerializer}; + use fastfield_codecs::blockwise_linear::{BlockwiseLinearReader, BlockwiseLinearSerializer}; + use fastfield_codecs::linear::{LinearReader, LinearSerializer}; use fastfield_codecs::*; fn get_data() -> Vec { @@ -52,32 +50,32 @@ mod tests { #[bench] fn bench_fastfield_bitpack_create(b: &mut Bencher) { let data: Vec<_> = get_data(); - bench_create::(b, &data); + bench_create::(b, &data); } #[bench] fn bench_fastfield_linearinterpol_create(b: &mut Bencher) { let data: Vec<_> = get_data(); - bench_create::(b, &data); + bench_create::(b, &data); } #[bench] fn bench_fastfield_multilinearinterpol_create(b: &mut Bencher) { let data: Vec<_> = get_data(); - bench_create::(b, &data); + bench_create::(b, &data); } #[bench] fn bench_fastfield_bitpack_get(b: &mut Bencher) { let data: Vec<_> = get_data(); - bench_get::(b, &data); + bench_get::(b, &data); } #[bench] fn bench_fastfield_linearinterpol_get(b: &mut Bencher) { let data: Vec<_> = get_data(); - bench_get::(b, &data); + bench_get::(b, &data); } #[bench] fn bench_fastfield_multilinearinterpol_get(b: &mut Bencher) { let data: Vec<_> = get_data(); - bench_get::(b, &data); + bench_get::(b, &data); } pub fn stats_from_vec(data: &[u64]) -> FastFieldStats { let min_value = data.iter().cloned().min().unwrap_or(0); diff --git a/fastfield_codecs/src/bitpacked.rs b/fastfield_codecs/src/bitpacked.rs index 6a61f7cbfa..f336e44405 100644 --- a/fastfield_codecs/src/bitpacked.rs +++ b/fastfield_codecs/src/bitpacked.rs @@ -11,14 +11,14 @@ use crate::{ /// Depending on the field type, a different /// fast field is required. #[derive(Clone)] -pub struct BitpackedFastFieldReader { +pub struct BitpackedReader { data: OwnedBytes, bit_unpacker: BitUnpacker, pub min_value_u64: u64, pub max_value_u64: u64, } -impl FastFieldCodecReader for BitpackedFastFieldReader { +impl FastFieldCodecReader for BitpackedReader { /// Opens a fast field given a file. fn open_from_bytes(bytes: OwnedBytes) -> io::Result { let footer_offset = bytes.len() - 16; @@ -28,7 +28,7 @@ impl FastFieldCodecReader for BitpackedFastFieldReader { let max_value = min_value + amplitude; let num_bits = compute_num_bits(amplitude); let bit_unpacker = BitUnpacker::new(num_bits); - Ok(BitpackedFastFieldReader { + Ok(BitpackedReader { data, min_value_u64: min_value, max_value_u64: max_value, @@ -48,7 +48,7 @@ impl FastFieldCodecReader for BitpackedFastFieldReader { self.max_value_u64 } } -pub struct BitpackedFastFieldSerializerLegacy<'a, W: 'a + Write> { +pub struct BitpackedSerializerLegacy<'a, W: 'a + Write> { bit_packer: BitPacker, write: &'a mut W, min_value: u64, @@ -56,7 +56,7 @@ pub struct BitpackedFastFieldSerializerLegacy<'a, W: 'a + Write> { num_bits: u8, } -impl<'a, W: Write> BitpackedFastFieldSerializerLegacy<'a, W> { +impl<'a, W: Write> BitpackedSerializerLegacy<'a, W> { /// Creates a new fast field serializer. /// /// The serializer in fact encode the values by bitpacking @@ -69,12 +69,12 @@ impl<'a, W: Write> BitpackedFastFieldSerializerLegacy<'a, W> { write: &'a mut W, min_value: u64, max_value: u64, - ) -> io::Result> { + ) -> io::Result> { assert!(min_value <= max_value); let amplitude = max_value - min_value; let num_bits = compute_num_bits(amplitude); let bit_packer = BitPacker::new(); - Ok(BitpackedFastFieldSerializerLegacy { + Ok(BitpackedSerializerLegacy { bit_packer, write, min_value, @@ -98,9 +98,9 @@ impl<'a, W: Write> BitpackedFastFieldSerializerLegacy<'a, W> { } } -pub struct BitpackedFastFieldSerializer {} +pub struct BitpackedSerializer {} -impl FastFieldCodecSerializer for BitpackedFastFieldSerializer { +impl FastFieldCodecSerializer for BitpackedSerializer { /// The CODEC_TYPE is an enum value used for serialization. const CODEC_TYPE: FastFieldCodecType = FastFieldCodecType::Bitpacked; @@ -116,7 +116,7 @@ impl FastFieldCodecSerializer for BitpackedFastFieldSerializer { write: &mut impl Write, fastfield_accessor: &dyn FastFieldDataAccess, ) -> io::Result<()> { - let mut serializer = BitpackedFastFieldSerializerLegacy::open( + let mut serializer = BitpackedSerializerLegacy::open( write, fastfield_accessor.min_value(), fastfield_accessor.max_value(), @@ -146,9 +146,7 @@ mod tests { use crate::tests::get_codec_test_data_sets; fn create_and_validate(data: &[u64], name: &str) { - crate::tests::create_and_validate::( - data, name, - ); + crate::tests::create_and_validate::(data, name); } #[test] diff --git a/fastfield_codecs/src/blockwise_linear.rs b/fastfield_codecs/src/blockwise_linear.rs index e2a87f3f67..c653170966 100644 --- a/fastfield_codecs/src/blockwise_linear.rs +++ b/fastfield_codecs/src/blockwise_linear.rs @@ -27,7 +27,7 @@ const CHUNK_SIZE: u64 = 512; /// Depending on the field type, a different /// fast field is required. #[derive(Clone)] -pub struct BlockwiseLinearFastFieldReader { +pub struct BlockwiseLinearReader { data: OwnedBytes, pub footer: BlockwiseLinearFooter, } @@ -148,14 +148,14 @@ fn get_interpolation_function(doc: u64, interpolations: &[Function]) -> &Functio &interpolations[get_interpolation_position(doc)] } -impl FastFieldCodecReader for BlockwiseLinearFastFieldReader { +impl FastFieldCodecReader for BlockwiseLinearReader { /// Opens a fast field given a file. fn open_from_bytes(bytes: OwnedBytes) -> io::Result { let footer_len: u32 = (&bytes[bytes.len() - 4..]).deserialize()?; let footer_offset = bytes.len() - 4 - footer_len as usize; let (data, mut footer) = bytes.split(footer_offset); let footer = BlockwiseLinearFooter::deserialize(&mut footer)?; - Ok(BlockwiseLinearFastFieldReader { data, footer }) + Ok(BlockwiseLinearReader { data, footer }) } #[inline] @@ -180,10 +180,10 @@ impl FastFieldCodecReader for BlockwiseLinearFastFieldReader { } } -/// Same as LinearInterpolFastFieldSerializer, but working on chunks of CHUNK_SIZE elements. -pub struct BlockwiseLinearFastFieldSerializer {} +/// Same as LinearSerializer, but working on chunks of CHUNK_SIZE elements. +pub struct BlockwiseLinearSerializer {} -impl FastFieldCodecSerializer for BlockwiseLinearFastFieldSerializer { +impl FastFieldCodecSerializer for BlockwiseLinearSerializer { const CODEC_TYPE: FastFieldCodecType = FastFieldCodecType::BlockwiseLinear; /// Creates a new fast field serializer. fn serialize( @@ -359,10 +359,9 @@ mod tests { use crate::tests::get_codec_test_data_sets; fn create_and_validate(data: &[u64], name: &str) -> (f32, f32) { - crate::tests::create_and_validate::< - BlockwiseLinearFastFieldSerializer, - BlockwiseLinearFastFieldReader, - >(data, name) + crate::tests::create_and_validate::( + data, name, + ) } const HIGHEST_BIT: u64 = 1 << 63; diff --git a/fastfield_codecs/src/lib.rs b/fastfield_codecs/src/lib.rs index c30f9a28fb..e72844be4b 100644 --- a/fastfield_codecs/src/lib.rs +++ b/fastfield_codecs/src/lib.rs @@ -165,11 +165,9 @@ mod tests { use proptest::arbitrary::any; use proptest::proptest; - use crate::bitpacked::{BitpackedFastFieldReader, BitpackedFastFieldSerializer}; - use crate::blockwise_linear::{ - BlockwiseLinearFastFieldReader, BlockwiseLinearFastFieldSerializer, - }; - use crate::linear::{LinearFastFieldReader, LinearFastFieldSerializer}; + use crate::bitpacked::{BitpackedReader, BitpackedSerializer}; + use crate::blockwise_linear::{BlockwiseLinearReader, BlockwiseLinearSerializer}; + use crate::linear::{LinearReader, LinearSerializer}; pub fn create_and_validate( data: &[u64], @@ -200,16 +198,16 @@ mod tests { proptest! { #[test] fn test_proptest_small(data in proptest::collection::vec(any::(), 1..10)) { - create_and_validate::(&data, "proptest linearinterpol"); - create_and_validate::(&data, "proptest multilinearinterpol"); - create_and_validate::(&data, "proptest bitpacked"); + create_and_validate::(&data, "proptest linearinterpol"); + create_and_validate::(&data, "proptest multilinearinterpol"); + create_and_validate::(&data, "proptest bitpacked"); } #[test] fn test_proptest_large(data in proptest::collection::vec(any::(), 1..6000)) { - create_and_validate::(&data, "proptest linearinterpol"); - create_and_validate::(&data, "proptest multilinearinterpol"); - create_and_validate::(&data, "proptest bitpacked"); + create_and_validate::(&data, "proptest linearinterpol"); + create_and_validate::(&data, "proptest multilinearinterpol"); + create_and_validate::(&data, "proptest bitpacked"); } } @@ -244,15 +242,15 @@ mod tests { } #[test] fn test_codec_bitpacking() { - test_codec::(); + test_codec::(); } #[test] fn test_codec_interpolation() { - test_codec::(); + test_codec::(); } #[test] fn test_codec_multi_interpolation() { - test_codec::(); + test_codec::(); } use super::*; @@ -261,24 +259,24 @@ mod tests { fn estimation_good_interpolation_case() { let data = (10..=20000_u64).collect::>(); - let linear_interpol_estimation = LinearFastFieldSerializer::estimate(&data); + let linear_interpol_estimation = LinearSerializer::estimate(&data); assert_le!(linear_interpol_estimation, 0.01); - let multi_linear_interpol_estimation = BlockwiseLinearFastFieldSerializer::estimate(&data); + let multi_linear_interpol_estimation = BlockwiseLinearSerializer::estimate(&data); assert_le!(multi_linear_interpol_estimation, 0.2); assert_le!(linear_interpol_estimation, multi_linear_interpol_estimation); - let bitpacked_estimation = BitpackedFastFieldSerializer::estimate(&data); + let bitpacked_estimation = BitpackedSerializer::estimate(&data); assert_le!(linear_interpol_estimation, bitpacked_estimation); } #[test] fn estimation_test_bad_interpolation_case() { let data = vec![200, 10, 10, 10, 10, 1000, 20]; - let linear_interpol_estimation = LinearFastFieldSerializer::estimate(&data); + let linear_interpol_estimation = LinearSerializer::estimate(&data); assert_le!(linear_interpol_estimation, 0.32); - let bitpacked_estimation = BitpackedFastFieldSerializer::estimate(&data); + let bitpacked_estimation = BitpackedSerializer::estimate(&data); assert_le!(bitpacked_estimation, linear_interpol_estimation); } #[test] @@ -288,10 +286,10 @@ mod tests { // in this case the linear interpolation can't in fact not be worse than bitpacking, // but the estimator adds some threshold, which leads to estimated worse behavior - let linear_interpol_estimation = LinearFastFieldSerializer::estimate(&data); + let linear_interpol_estimation = LinearSerializer::estimate(&data); assert_le!(linear_interpol_estimation, 0.35); - let bitpacked_estimation = BitpackedFastFieldSerializer::estimate(&data); + let bitpacked_estimation = BitpackedSerializer::estimate(&data); assert_le!(bitpacked_estimation, 0.32); assert_le!(bitpacked_estimation, linear_interpol_estimation); } diff --git a/fastfield_codecs/src/linear.rs b/fastfield_codecs/src/linear.rs index 130e54bd41..a790ca3be4 100644 --- a/fastfield_codecs/src/linear.rs +++ b/fastfield_codecs/src/linear.rs @@ -12,7 +12,7 @@ use crate::{ /// Depending on the field type, a different /// fast field is required. #[derive(Clone)] -pub struct LinearFastFieldReader { +pub struct LinearReader { data: OwnedBytes, bit_unpacker: BitUnpacker, pub footer: LinearFooter, @@ -59,7 +59,7 @@ impl FixedSize for LinearFooter { const SIZE_IN_BYTES: usize = 56; } -impl FastFieldCodecReader for LinearFastFieldReader { +impl FastFieldCodecReader for LinearReader { /// Opens a fast field given a file. fn open_from_bytes(bytes: OwnedBytes) -> io::Result { let footer_offset = bytes.len() - LinearFooter::SIZE_IN_BYTES; @@ -68,7 +68,7 @@ impl FastFieldCodecReader for LinearFastFieldReader { let slope = get_slope(footer.first_val, footer.last_val, footer.num_vals); let num_bits = compute_num_bits(footer.relative_max_value); let bit_unpacker = BitUnpacker::new(num_bits); - Ok(LinearFastFieldReader { + Ok(LinearReader { data, bit_unpacker, footer, @@ -93,7 +93,7 @@ impl FastFieldCodecReader for LinearFastFieldReader { /// Fastfield serializer, which tries to guess values by linear interpolation /// and stores the difference bitpacked. -pub struct LinearFastFieldSerializer {} +pub struct LinearSerializer {} #[inline] pub(crate) fn get_slope(first_val: u64, last_val: u64, num_vals: u64) -> f32 { @@ -134,7 +134,7 @@ pub fn get_calculated_value(first_val: u64, pos: u64, slope: f32) -> u64 { } } -impl FastFieldCodecSerializer for LinearFastFieldSerializer { +impl FastFieldCodecSerializer for LinearSerializer { const CODEC_TYPE: FastFieldCodecType = FastFieldCodecType::Linear; /// Creates a new fast field serializer. @@ -260,9 +260,7 @@ mod tests { use crate::tests::get_codec_test_data_sets; fn create_and_validate(data: &[u64], name: &str) -> (f32, f32) { - crate::tests::create_and_validate::( - data, name, - ) + crate::tests::create_and_validate::(data, name) } #[test] diff --git a/fastfield_codecs/src/main.rs b/fastfield_codecs/src/main.rs index 24cc082e1b..4f5a1d2397 100644 --- a/fastfield_codecs/src/main.rs +++ b/fastfield_codecs/src/main.rs @@ -1,7 +1,7 @@ #[macro_use] extern crate prettytable; -use fastfield_codecs::blockwise_linear::BlockwiseLinearFastFieldSerializer; -use fastfield_codecs::linear::LinearFastFieldSerializer; +use fastfield_codecs::blockwise_linear::BlockwiseLinearSerializer; +use fastfield_codecs::linear::LinearSerializer; use fastfield_codecs::{FastFieldCodecSerializer, FastFieldCodecType, FastFieldStats}; use prettytable::{Cell, Row, Table}; @@ -13,13 +13,11 @@ fn main() { for (data, data_set_name) in get_codec_test_data_sets() { let mut results = vec![]; - let res = serialize_with_codec::(&data); + let res = serialize_with_codec::(&data); results.push(res); - let res = serialize_with_codec::(&data); + let res = serialize_with_codec::(&data); results.push(res); - let res = serialize_with_codec::( - &data, - ); + let res = serialize_with_codec::(&data); results.push(res); // let best_estimation_codec = results diff --git a/src/fastfield/multivalued/writer.rs b/src/fastfield/multivalued/writer.rs index 7b976e3273..3f0255b762 100644 --- a/src/fastfield/multivalued/writer.rs +++ b/src/fastfield/multivalued/writer.rs @@ -3,7 +3,7 @@ use std::io; use fnv::FnvHashMap; use tantivy_bitpacker::minmax; -use crate::fastfield::serializer::BitpackedFastFieldSerializerLegacy; +use crate::fastfield::serializer::BitpackedSerializerLegacy; use crate::fastfield::{value_to_u64, CompositeFastFieldSerializer, FastFieldType, FastValue}; use crate::indexer::doc_id_mapping::DocIdMapping; use crate::postings::UnorderedTermId; @@ -171,7 +171,7 @@ impl MultiValuedFastFieldWriter { } { // writing the values themselves. - let mut value_serializer: BitpackedFastFieldSerializerLegacy<'_, _>; + let mut value_serializer: BitpackedSerializerLegacy<'_, _>; if let Some(mapping) = mapping_opt { value_serializer = serializer.new_u64_fast_field_with_idx( self.field, diff --git a/src/fastfield/reader.rs b/src/fastfield/reader.rs index b117d9fcd3..f3c8d28207 100644 --- a/src/fastfield/reader.rs +++ b/src/fastfield/reader.rs @@ -3,9 +3,9 @@ use std::marker::PhantomData; use std::path::Path; use common::BinarySerializable; -use fastfield_codecs::bitpacked::BitpackedFastFieldReader as BitpackedReader; -use fastfield_codecs::blockwise_linear::BlockwiseLinearFastFieldReader; -use fastfield_codecs::linear::LinearFastFieldReader; +use fastfield_codecs::bitpacked::BitpackedReader; +use fastfield_codecs::blockwise_linear::BlockwiseLinearReader; +use fastfield_codecs::linear::LinearReader; use fastfield_codecs::{FastFieldCodecReader, FastFieldCodecType}; use super::{FastValue, GCDFastFieldCodec}; @@ -63,18 +63,16 @@ pub enum DynamicFastFieldReader { /// Bitpacked compressed fastfield data. Bitpacked(FastFieldReaderCodecWrapper), /// Linear interpolated values + bitpacked - Linear(FastFieldReaderCodecWrapper), + Linear(FastFieldReaderCodecWrapper), /// Blockwise linear interpolated values + bitpacked - BlockwiseLinear(FastFieldReaderCodecWrapper), + BlockwiseLinear(FastFieldReaderCodecWrapper), /// GCD and Bitpacked compressed fastfield data. BitpackedGCD(FastFieldReaderCodecWrapper>), /// GCD and Linear interpolated values + bitpacked - LinearGCD(FastFieldReaderCodecWrapper>), + LinearGCD(FastFieldReaderCodecWrapper>), /// GCD and Blockwise linear interpolated values + bitpacked - BlockwiseLinearGCD( - FastFieldReaderCodecWrapper>, - ), + BlockwiseLinearGCD(FastFieldReaderCodecWrapper>), } impl DynamicFastFieldReader { @@ -90,16 +88,13 @@ impl DynamicFastFieldReader { BitpackedReader, >::open_from_bytes(bytes)?) } - FastFieldCodecType::Linear => { - DynamicFastFieldReader::Linear(FastFieldReaderCodecWrapper::< - Item, - LinearFastFieldReader, - >::open_from_bytes(bytes)?) - } + FastFieldCodecType::Linear => DynamicFastFieldReader::Linear( + FastFieldReaderCodecWrapper::::open_from_bytes(bytes)?, + ), FastFieldCodecType::BlockwiseLinear => { DynamicFastFieldReader::BlockwiseLinear(FastFieldReaderCodecWrapper::< Item, - BlockwiseLinearFastFieldReader, + BlockwiseLinearReader, >::open_from_bytes(bytes)?) } FastFieldCodecType::Gcd => { @@ -116,7 +111,7 @@ impl DynamicFastFieldReader { FastFieldCodecType::Linear => { DynamicFastFieldReader::LinearGCD(FastFieldReaderCodecWrapper::< Item, - GCDFastFieldCodec, + GCDFastFieldCodec, >::open_from_bytes( bytes )?) @@ -124,7 +119,7 @@ impl DynamicFastFieldReader { FastFieldCodecType::BlockwiseLinear => { DynamicFastFieldReader::BlockwiseLinearGCD(FastFieldReaderCodecWrapper::< Item, - GCDFastFieldCodec, + GCDFastFieldCodec, >::open_from_bytes( bytes )?) diff --git a/src/fastfield/serializer/mod.rs b/src/fastfield/serializer/mod.rs index eb4d37b3c3..1655cd7daa 100644 --- a/src/fastfield/serializer/mod.rs +++ b/src/fastfield/serializer/mod.rs @@ -3,11 +3,9 @@ use std::num::NonZeroU64; use common::{BinarySerializable, CountingWriter}; use fastdivide::DividerU64; -pub use fastfield_codecs::bitpacked::{ - BitpackedFastFieldSerializer, BitpackedFastFieldSerializerLegacy, -}; -use fastfield_codecs::blockwise_linear::BlockwiseLinearFastFieldSerializer; -use fastfield_codecs::linear::LinearFastFieldSerializer; +pub use fastfield_codecs::bitpacked::{BitpackedSerializer, BitpackedSerializerLegacy}; +use fastfield_codecs::blockwise_linear::BlockwiseLinearSerializer; +use fastfield_codecs::linear::LinearSerializer; use fastfield_codecs::FastFieldCodecType; pub use fastfield_codecs::{FastFieldCodecSerializer, FastFieldDataAccess, FastFieldStats}; @@ -206,19 +204,13 @@ impl CompositeFastFieldSerializer { let mut estimations = vec![]; if codec_enable_checker.is_enabled(FastFieldCodecType::Bitpacked) { - codec_estimation::( - &fastfield_accessor, - &mut estimations, - ); + codec_estimation::(&fastfield_accessor, &mut estimations); } if codec_enable_checker.is_enabled(FastFieldCodecType::Linear) { - codec_estimation::(&fastfield_accessor, &mut estimations); + codec_estimation::(&fastfield_accessor, &mut estimations); } if codec_enable_checker.is_enabled(FastFieldCodecType::BlockwiseLinear) { - codec_estimation::( - &fastfield_accessor, - &mut estimations, - ); + codec_estimation::(&fastfield_accessor, &mut estimations); } if let Some(broken_estimation) = estimations.iter().find(|estimation| estimation.0.is_nan()) { @@ -237,13 +229,13 @@ impl CompositeFastFieldSerializer { Self::write_header(field_write, codec_type)?; match codec_type { FastFieldCodecType::Bitpacked => { - BitpackedFastFieldSerializer::serialize(field_write, &fastfield_accessor)?; + BitpackedSerializer::serialize(field_write, &fastfield_accessor)?; } FastFieldCodecType::Linear => { - LinearFastFieldSerializer::serialize(field_write, &fastfield_accessor)?; + LinearSerializer::serialize(field_write, &fastfield_accessor)?; } FastFieldCodecType::BlockwiseLinear => { - BlockwiseLinearFastFieldSerializer::serialize(field_write, &fastfield_accessor)?; + BlockwiseLinearSerializer::serialize(field_write, &fastfield_accessor)?; } FastFieldCodecType::Gcd => { return Err(io::Error::new( @@ -263,7 +255,7 @@ impl CompositeFastFieldSerializer { field: Field, min_value: u64, max_value: u64, - ) -> io::Result>> { + ) -> io::Result>> { self.new_u64_fast_field_with_idx(field, min_value, max_value, 0) } @@ -273,7 +265,7 @@ impl CompositeFastFieldSerializer { field: Field, min_value: u64, max_value: u64, - ) -> io::Result>> { + ) -> io::Result>> { self.new_u64_fast_field_with_idx(field, min_value, max_value, 0) } @@ -284,11 +276,11 @@ impl CompositeFastFieldSerializer { min_value: u64, max_value: u64, idx: usize, - ) -> io::Result>> { + ) -> io::Result>> { let field_write = self.composite_write.for_field_with_idx(field, idx); // Prepend codec id to field data for compatibility with DynamicFastFieldReader. FastFieldCodecType::Bitpacked.serialize(field_write)?; - BitpackedFastFieldSerializerLegacy::open(field_write, min_value, max_value) + BitpackedSerializerLegacy::open(field_write, min_value, max_value) } /// Start serializing a new [u8] fast field