Skip to content

Commit

Permalink
Merge a277cf4 into 456393b
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalkin committed Dec 3, 2020
2 parents 456393b + a277cf4 commit 291f1e2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
28 changes: 0 additions & 28 deletions hll/include/HllUnion-internal.hpp
Expand Up @@ -37,34 +37,6 @@ hll_union_alloc<A>::hll_union_alloc(const int lg_max_k):
gadget(lg_max_k, target_hll_type::HLL_8)
{}

template<typename A>
hll_union_alloc<A> hll_union_alloc<A>::deserialize(const void* bytes, size_t len) {
hll_sketch_alloc<A> sk(hll_sketch_alloc<A>::deserialize(bytes, len));
// we're using the sketch's lg_config_k to initialize the union so
// we can initialize the Union with it as long as it's HLL_8.
hll_union_alloc<A> hllUnion(sk.get_lg_config_k());
if (sk.get_target_type() == HLL_8) {
std::swap(hllUnion.gadget.sketch_impl, sk.sketch_impl);
} else {
hllUnion.update(sk);
}
return hllUnion;
}

template<typename A>
hll_union_alloc<A> hll_union_alloc<A>::deserialize(std::istream& is) {
hll_sketch_alloc<A> sk(hll_sketch_alloc<A>::deserialize(is));
// we're using the sketch's lg_config_k to initialize the union so
// we can initialize the Union with it as long as it's HLL_8.
hll_union_alloc<A> hllUnion(sk.get_lg_config_k());
if (sk.get_target_type() == HLL_8) {
std::swap(hllUnion.gadget.sketch_impl, sk.sketch_impl);
} else {
hllUnion.update(sk);
}
return hllUnion;
}

template<typename A>
hll_sketch_alloc<A> hll_union_alloc<A>::get_result(target_hll_type target_type) const {
return hll_sketch_alloc<A>(gadget, target_type);
Expand Down
15 changes: 0 additions & 15 deletions hll/include/hll.hpp
Expand Up @@ -433,21 +433,6 @@ class hll_union_alloc {
*/
explicit hll_union_alloc(int lg_max_k);

/**
* Construct an hll_union operator from the given std::istream, which
* must be a valid serialized image of an hll_union.
* @param is The input stream from which to read.
*/
static hll_union_alloc deserialize(std::istream& is);

/**
* Construct an hll_union operator from the given byte array, which
* must be a valid serialized image of an hll_union.
* @param bytes The byte array to read.
* @param len Byte array length in bytes.
*/
static hll_union_alloc deserialize(const void* bytes, size_t len);

/**
* Returns the current cardinality estimate
* @return the cardinality estimate
Expand Down

0 comments on commit 291f1e2

Please sign in to comment.