diff options
author | Milena Ivanova <milena.ivanova@mongodb.com> | 2022-09-30 12:08:38 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-09-30 13:04:57 +0000 |
commit | 1c4fafd4ae5c082f36a8af1442aa48174962b1b4 (patch) | |
tree | 5f06af8c2227d5505daada02ea8746a09e6a89ed /src/mongo/db/query/ce/ce_interpolation_test.cpp | |
parent | 5b1663a2e449ec0f563e0f9a7f80c0fddb709596 (diff) | |
download | mongo-6/0.tar.gz |
SERVER-68446 Unit testing of simple histogram CE with all data types6/0
Diffstat (limited to 'src/mongo/db/query/ce/ce_interpolation_test.cpp')
-rw-r--r-- | src/mongo/db/query/ce/ce_interpolation_test.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mongo/db/query/ce/ce_interpolation_test.cpp b/src/mongo/db/query/ce/ce_interpolation_test.cpp index 043d9074b10..63c134cb131 100644 --- a/src/mongo/db/query/ce/ce_interpolation_test.cpp +++ b/src/mongo/db/query/ce/ce_interpolation_test.cpp @@ -38,11 +38,6 @@ namespace { using namespace sbe; -double estimateIntValCard(const ScalarHistogram& hist, const int v, const EstimationType type) { - auto [tag, val] = std::make_pair(value::TypeTags::NumberInt64, value::bitcastFrom<int64_t>(v)); - return estimate(hist, tag, val, type).card; -}; - TEST(EstimatorTest, ManualHistogram) { std::vector<BucketData> data{{0, 1.0, 1.0, 1.0}, {10, 1.0, 10.0, 5.0}, @@ -481,7 +476,7 @@ TEST(EstimatorTest, UniformIntMixedArrayEstimate) { highTag, highVal, true /* includeScalar */); - ASSERT_APPROX_EQUAL(90.9, expectedCard, 0.1); // Actual: 94. + ASSERT_APPROX_EQUAL(92.9, expectedCard, 0.1); // Actual: 94. // Test interpolation for query: [{$match: {a: {$elemMatch: {$gt: 500, $lt: 550}}}}]. expectedCard = estimateCardRange(arrHist, |