You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
theta.PreambleUtil.preambleToString() derives CurrentCount for one-preamble-long images from SINGLEITEM_FLAG_MASK.
Historical C++ single-item images may omit that flag. Java accepts those images because the theta parser deliberately does not depend on the flag, but the diagnostic output reports CurrentCount: 0 even though the image contains one retained item.
This was identified while resolving the cross-language differences tracked in apache/datasketches-cpp#460. Current C++ now writes the flag, but older valid images still expose the diagnostic mismatch.
Expected behavior
For a one-preamble-long theta image, derive the diagnostic count from the empty flag:
empty image: CurrentCount: 0
non-empty image: CurrentCount: 1
The printed SINGLE_ITEM field should continue to reflect the serialized flag itself.
Proposed test
Serialize a single-item compact sketch, clear only the single-item flag to model a historical C++ image, and verify that preambleToString() reports CurrentCount: 1 while preserving SINGLE_ITEM: false.
Activity