diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-11 15:07:35 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-11 15:07:35 -0300 |
| commit | 4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch) | |
| tree | 1682a647d4463397c119183369ae6f750d5fdcff /src/mongo/db/exec/sbe/values/value_serialization_test.cpp | |
| parent | aa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff) | |
| parent | 8f0827553e09872941945a093b647a4211a9db7f (diff) | |
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0'
with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'src/mongo/db/exec/sbe/values/value_serialization_test.cpp')
| -rw-r--r-- | src/mongo/db/exec/sbe/values/value_serialization_test.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/mongo/db/exec/sbe/values/value_serialization_test.cpp b/src/mongo/db/exec/sbe/values/value_serialization_test.cpp index ceacf610a4a..5b44bef6549 100644 --- a/src/mongo/db/exec/sbe/values/value_serialization_test.cpp +++ b/src/mongo/db/exec/sbe/values/value_serialization_test.cpp @@ -268,18 +268,6 @@ TEST_F(ValueSerializeForKeyString, SbeArray) { runTest({{testDataTag, testDataVal}}); } -TEST_F(ValueSerializeForKeyString, ArraySet) { - auto [tag, val] = sbe::value::makeNewArraySet(); - sbe::value::ValueGuard guard{tag, val}; - auto* arraySet = sbe::value::getArraySetView(val); - - arraySet->push_back(value::TypeTags::NumberInt32, value::bitcastFrom<int32_t>(1)); - arraySet->push_back(value::TypeTags::NumberInt64, value::bitcastFrom<int64_t>(2)); - arraySet->push_back(value::TypeTags::NumberDouble, value::bitcastFrom<double>(3.0)); - - runTest({{tag, val}}); -} - TEST_F(ValueSerializeForKeyString, DateTime) { runTest({{value::TypeTags::Date, value::bitcastFrom<int64_t>(1234)}, {value::TypeTags::Timestamp, value::bitcastFrom<uint64_t>(5678)}}); @@ -454,30 +442,4 @@ TEST_F(ValueSerializeForKeyString, BsonCodeWScope) { runTest({{cwsTag1, cwsVal1}, {cwsTag2, cwsVal2}, {cwsTag3, cwsVal3}}); } - -// Test that roundtripping through KeyString works for a wide row. KeyStrings used in indexes are -// typically constrained in the number of components they can have, since we limit compound indexes -// to at most 32 components. But roundtripping rows wider than 32 still needs to work. -// -// This test was originally designed to reproduce SERVER-76321. -TEST_F(ValueSerializeForKeyString, RoundtripWideRow) { - std::vector<std::pair<sbe::value::TypeTags, sbe::value::Value>> row; - for (int32_t i = 0; i < 40; ++i) { - row.emplace_back(sbe::value::TypeTags::NumberInt32, sbe::value::bitcastFrom<int32_t>(i)); - } - runTest(row); -} - -// Test that roundtripping through KeyString works for ObjectIdType: ObjectId; bsonObjectId. -TEST_F(ValueSerializeForKeyString, RoundtripObjectIdType) { - auto [objectIdTag, objectIdVal] = value::makeNewObjectId(); - - auto oid = OID::gen(); - auto obj = BSON("" << oid); - auto oidStorage = obj.firstElement().value(); - - sbe::value::ValueGuard testDataGuard{objectIdTag, objectIdVal}; - runTest({{objectIdTag, objectIdVal}, - {value::TypeTags::bsonObjectId, value::bitcastFrom<const char*>(oidStorage)}}); -} } // namespace mongo::sbe |
