Open fsolleza opened 3 years ago
In case it might be helpful, per #2, the code below seems to be failing at a very specific location:
let data: Vec<u64> = (0..100000).collect();
let mut appender = VectorU64Appender::try_new(data.len()).unwrap();
let result = appender.encode_all(data.clone()).unwrap();
let reader = VectorReader::try_new(&result[..]).unwrap();
let result: Vec<u64> = reader.iterate().collect();
let start = 48_380;
let end = 48_390;
assert_eq!(&data[start..end], &result[start..end]);
Error is:
left: `[48380, 48381, 48382, 48383, 48384, 48385, 48386, 48387, 48388, 48389]`,
right: `[48380, 48381, 48382, 48383, 48128, 48129, 48130, 48131, 48132, 48133]`', src/main.rs:67:5
The code below fails on the last assert:
assert_eq!(sink.values, input);
. It seems like the last 8u64
values are not written to the sink.Other inputs (e.g. the commented out input) seem to not exhibit this behavior. This might be triggered by some edge case.
Alternatively, maybe I'm not understanding how
NibblePackMedFixedSect
andSection256Sink
should interact - but I'm pretty sure I do.Thanks!