This is an automated email from the ASF dual-hosted git repository. alsay pushed a commit to branch cross_lang_compat in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-cpp.git
commit c0ba29a13dea76e0f12601a342b8d87b32b0cacd Author: AlexanderSaydakov <alexandersayda...@users.noreply.github.com> AuthorDate: Mon Apr 20 20:26:50 2020 -0700 compatibility with Java --- hll/include/CouponHashSet-internal.hpp | 2 -- hll/include/CouponList-internal.hpp | 7 +++---- hll/include/HllSketchImplFactory.hpp | 1 - 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/hll/include/CouponHashSet-internal.hpp b/hll/include/CouponHashSet-internal.hpp index 84c8199..159f90a 100644 --- a/hll/include/CouponHashSet-internal.hpp +++ b/hll/include/CouponHashSet-internal.hpp @@ -107,7 +107,6 @@ CouponHashSet<A>* CouponHashSet<A>::newSet(const void* bytes, size_t len) { } CouponHashSet<A>* sketch = new (chsAlloc().allocate(1)) CouponHashSet<A>(lgK, tgtHllType); - sketch->putOutOfOrderFlag(true); if (compactFlag) { const uint8_t* curPos = data + HllUtil<A>::HASH_SET_INT_ARR_START; @@ -170,7 +169,6 @@ CouponHashSet<A>* CouponHashSet<A>::newSet(std::istream& is) { } CouponHashSet<A>* sketch = new (chsAlloc().allocate(1)) CouponHashSet<A>(lgK, tgtHllType); - sketch->putOutOfOrderFlag(true); // Don't set couponCount here; // we'll set later if updatable, and increment with updates if compact diff --git a/hll/include/CouponList-internal.hpp b/hll/include/CouponList-internal.hpp index f9d3ca0..448a95d 100644 --- a/hll/include/CouponList-internal.hpp +++ b/hll/include/CouponList-internal.hpp @@ -34,11 +34,10 @@ CouponList<A>::CouponList(const int lgConfigK, const target_hll_type tgtHllType, : HllSketchImpl<A>(lgConfigK, tgtHllType, mode, false) { if (mode == hll_mode::LIST) { lgCouponArrInts = HllUtil<A>::LG_INIT_LIST_SIZE; - oooFlag = false; } else { // mode == SET lgCouponArrInts = HllUtil<A>::LG_INIT_SET_SIZE; - oooFlag = true; } + oooFlag = false; const int arrayLen = 1 << lgCouponArrInts; typedef typename std::allocator_traits<A>::template rebind_alloc<int> intAlloc; couponIntArr = intAlloc().allocate(arrayLen); @@ -296,9 +295,9 @@ HllSketchImpl<A>* CouponList<A>::couponUpdate(int coupon) { ++couponCount; if (couponCount >= len) { // array full if (this->lgConfigK < 8) { - return promoteHeapListOrSetToHll(*this); // oooFlag = false + return promoteHeapListOrSetToHll(*this); } - return promoteHeapListToSet(*this); // oooFlag = true; + return promoteHeapListToSet(*this); } return this; } diff --git a/hll/include/HllSketchImplFactory.hpp b/hll/include/HllSketchImplFactory.hpp index eae6f75..eb8dd77 100644 --- a/hll/include/HllSketchImplFactory.hpp +++ b/hll/include/HllSketchImplFactory.hpp @@ -56,7 +56,6 @@ CouponHashSet<A>* HllSketchImplFactory<A>::promoteListToSet(const CouponList<A>& for (auto coupon: list) { chSet->couponUpdate(coupon); } - chSet->putOutOfOrderFlag(true); return chSet; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@datasketches.apache.org For additional commands, e-mail: commits-h...@datasketches.apache.org