Skip to content
Permalink
Browse files
clean up a few warnings
  • Loading branch information
Jon committed Apr 23, 2022
1 parent bf2a0bc commit e2d2becc29443881388f76e78a551ae8e14626e2
Showing 2 changed files with 3 additions and 3 deletions.
@@ -1112,8 +1112,8 @@ void quantiles_sketch<T, C, A>::downsampling_merge(quantiles_sketch<T,C,A>& tgt,
}
assert(!src.is_empty());

const uint32_t downsample_factor = src.get_k() / tgt.get_k();
const uint32_t lg_sample_factor = count_trailing_zeros_in_u32(downsample_factor);
const uint16_t downsample_factor = src.get_k() / tgt.get_k();
const uint8_t lg_sample_factor = count_trailing_zeros_in_u32(downsample_factor);

uint64_t new_n = src.get_n() + tgt.get_n();

@@ -574,7 +574,7 @@ TEST_CASE("quantiles sketch", "[quantiles_sketch]") {
REQUIRE(sketch1.get_max_value() == n - 1);
REQUIRE(sketch1.get_quantile(0.5) == Approx(n / 2).margin(n / 2 * RANK_EPS_FOR_K_128));

sketch2.update(0);
sketch2.update(static_cast<float>(0));
sketch1.merge(sketch2);
// rank error should not be affected by a merge with a sketch in exact mode with lower k
REQUIRE(sketch1.get_normalized_rank_error(true) == rank_error_before_merge);

0 comments on commit e2d2bec

Please sign in to comment.