This is an automated email from the ASF dual-hosted git repository.
notfilippo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datasketches-rust.git
The following commit(s) were added to refs/heads/main by this push:
new c6ed433 Bugfix: HLL4 written in rust cannot not be loaded in Java
(#132)
c6ed433 is described below
commit c6ed433e5c7bff2bcf4577004e762270a1f70517
Author: Paul Masurel <[email protected]>
AuthorDate: Tue May 19 17:39:54 2026 +0200
Bugfix: HLL4 written in rust cannot not be loaded in Java (#132)
---
datasketches/src/hll/array4.rs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/datasketches/src/hll/array4.rs b/datasketches/src/hll/array4.rs
index f6bc879..27798d0 100644
--- a/datasketches/src/hll/array4.rs
+++ b/datasketches/src/hll/array4.rs
@@ -29,6 +29,7 @@ use crate::common::NumStdDev;
use crate::error::Error;
use crate::hll::Coupon;
use crate::hll::estimator::HipEstimator;
+use crate::hll::serialization::COMPACT_FLAG_MASK;
use crate::hll::serialization::COUPON_SIZE_BYTES;
use crate::hll::serialization::CUR_MODE_HLL;
use crate::hll::serialization::HLL_PREAMBLE_SIZE;
@@ -388,8 +389,10 @@ impl Array4 {
bytes.write_u8(lg_config_k);
bytes.write_u8(0); // unused for HLL mode
- // Write flags
- let mut flags = 0u8;
+ // Write flags.
+ // COMPACT_FLAG_MASK is always set: aux map entries are written as a
compact sequential
+ // list of populated entries only.
+ let mut flags = COMPACT_FLAG_MASK;
if self.estimator.is_out_of_order() {
flags |= OUT_OF_ORDER_FLAG_MASK;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]