summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/sbe/values/columnar_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/sbe/values/columnar_test.cpp')
-rw-r--r--src/mongo/db/exec/sbe/values/columnar_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/exec/sbe/values/columnar_test.cpp b/src/mongo/db/exec/sbe/values/columnar_test.cpp
index 9dc9e7717d0..ebbed88848a 100644
--- a/src/mongo/db/exec/sbe/values/columnar_test.cpp
+++ b/src/mongo/db/exec/sbe/values/columnar_test.cpp
@@ -201,4 +201,11 @@ TEST(ColumnarObjTest, AddNonLeafCellWithArrayInfoToObject) {
std::vector<MockTranslatedCell> cells{makeCellOfIntegers("a.b", "{[o1", {})};
compareMakeObjWithExpected(cells, fromjson("{a: {b: [{}, {}]}}"));
}
+
+TEST(ColumnarObjTest, AddLeafCellThenAddSparseSibling) {
+ std::vector<MockTranslatedCell> cells{makeCellOfIntegers("a.b", "[", {1, 2}),
+ makeCellOfIntegers("a", "[o1", {}),
+ makeCellOfIntegers("a.c", "[1", {3})};
+ compareMakeObjWithExpected(cells, fromjson("{a: [{b: 1}, {b: 2, c: 3}]}"));
+}
} // namespace mongo::sbe