Merge pull request #175 from apache/hll_union_remove_deser
Remove hll_union::deserialize() that was accidentally left in
diff --git a/hll/include/HllUnion-internal.hpp b/hll/include/HllUnion-internal.hpp
index 5aa184f..0d12fd3 100644
--- a/hll/include/HllUnion-internal.hpp
+++ b/hll/include/HllUnion-internal.hpp
@@ -38,34 +38,6 @@
{}
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);
}
diff --git a/hll/include/hll.hpp b/hll/include/hll.hpp
index c76ba48..3898dda 100644
--- a/hll/include/hll.hpp
+++ b/hll/include/hll.hpp
@@ -434,21 +434,6 @@
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
*/