From a1b1647155b891c22ff6abe93d0f3e66ef64da05 Mon Sep 17 00:00:00 2001 From: YJMSTR Date: Sun, 17 Nov 2024 09:22:42 +0800 Subject: [PATCH 1/4] Fix typo in hyperloglog.h (#763) --- src/include/primer/hyperloglog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/primer/hyperloglog.h b/src/include/primer/hyperloglog.h index f5337b9bf..9c15e5262 100644 --- a/src/include/primer/hyperloglog.h +++ b/src/include/primer/hyperloglog.h @@ -34,7 +34,7 @@ class HyperLogLog { auto GetCardinality() { return cardinality_; } /** - * @brief Ddds a value into the HyperLogLog. + * @brief Adds a value into the HyperLogLog. * * @param[in] val - value that's added into hyperloglog */ From 3d21a8edfa0412b0b56a46f29861270b9ece6e33 Mon Sep 17 00:00:00 2001 From: Wangchf <115294077+Wangch29@users.noreply.github.com> Date: Sat, 16 Nov 2024 20:23:07 -0500 Subject: [PATCH 2/4] fix typo (#773) --- src/execution/topn_per_group_executor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/execution/topn_per_group_executor.cpp b/src/execution/topn_per_group_executor.cpp index 8e058d0b3..e4d0392a9 100644 --- a/src/execution/topn_per_group_executor.cpp +++ b/src/execution/topn_per_group_executor.cpp @@ -4,7 +4,7 @@ // // topn_per_group_executor.cpp // -// Identification: src/execution/topn_executor.cpp +// Identification: src/execution/topn_per_group_executor.cpp // // Copyright (c) 2015-2021, Carnegie Mellon University Database Group // From 23d6f2e55f40a5c815a0a8c02da127bb795626a3 Mon Sep 17 00:00:00 2001 From: Lan Lou <62441979+lanlou1554@users.noreply.github.com> Date: Sat, 16 Nov 2024 20:23:33 -0500 Subject: [PATCH 3/4] f24-p2(test): Sync public tests for Project 2 (#771) * Sync public tests for Project 2 * Sync public tests for Project 2 --- test/storage/b_plus_tree_delete_test.cpp | 4 ++-- test/storage/b_plus_tree_insert_test.cpp | 20 +++++++++---------- .../b_plus_tree_sequential_scale_test.cpp | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/storage/b_plus_tree_delete_test.cpp b/test/storage/b_plus_tree_delete_test.cpp index 80bd118e9..c6bfa7afd 100644 --- a/test/storage/b_plus_tree_delete_test.cpp +++ b/test/storage/b_plus_tree_delete_test.cpp @@ -24,7 +24,7 @@ namespace bustub { using bustub::DiskManagerUnlimitedMemory; -TEST(BPlusTreeTests, DISABLED_DeleteTest) { +TEST(BPlusTreeTests, DISABLED_DeleteTestNoIterator) { // create KeyComparator and index schema auto key_schema = ParseCreateStatement("a bigint"); GenericComparator<8> comparator(key_schema.get()); @@ -34,7 +34,7 @@ TEST(BPlusTreeTests, DISABLED_DeleteTest) { // allocate header_page page_id_t page_id = bpm->NewPage(); // create b+ tree - BPlusTree, RID, GenericComparator<8>> tree("foo_pk", page_id, bpm, comparator); + BPlusTree, RID, GenericComparator<8>> tree("foo_pk", page_id, bpm, comparator, 2, 3); GenericKey<8> index_key; RID rid; diff --git a/test/storage/b_plus_tree_insert_test.cpp b/test/storage/b_plus_tree_insert_test.cpp index 1c7fb817d..f1a67c7a0 100644 --- a/test/storage/b_plus_tree_insert_test.cpp +++ b/test/storage/b_plus_tree_insert_test.cpp @@ -23,7 +23,7 @@ namespace bustub { using bustub::DiskManagerUnlimitedMemory; -TEST(BPlusTreeTests, DISABLED_InsertTest1) { +TEST(BPlusTreeTests, DISABLED_BasicInsertTest) { // create KeyComparator and index schema auto key_schema = ParseCreateStatement("a bigint"); GenericComparator<8> comparator(key_schema.get()); @@ -56,7 +56,7 @@ TEST(BPlusTreeTests, DISABLED_InsertTest1) { delete bpm; } -TEST(BPlusTreeTests, DISABLED_InsertTest2) { +TEST(BPlusTreeTests, DISABLED_InsertTest1NoIterator) { // create KeyComparator and index schema auto key_schema = ParseCreateStatement("a bigint"); GenericComparator<8> comparator(key_schema.get()); @@ -95,7 +95,7 @@ TEST(BPlusTreeTests, DISABLED_InsertTest2) { delete bpm; } -TEST(BPlusTreeTests, DISABLED_InsertTest3) { +TEST(BPlusTreeTests, DISABLED_InsertTest2) { // create KeyComparator and index schema auto key_schema = ParseCreateStatement("a bigint"); GenericComparator<8> comparator(key_schema.get()); @@ -105,7 +105,7 @@ TEST(BPlusTreeTests, DISABLED_InsertTest3) { // allocate header_page page_id_t page_id = bpm->NewPage(); // create b+ tree - BPlusTree, RID, GenericComparator<8>> tree("foo_pk", page_id, bpm, comparator); + BPlusTree, RID, GenericComparator<8>> tree("foo_pk", page_id, bpm, comparator, 2, 3); GenericKey<8> index_key; RID rid; @@ -130,12 +130,12 @@ TEST(BPlusTreeTests, DISABLED_InsertTest3) { int64_t start_key = 1; int64_t current_key = start_key; - index_key.SetFromInteger(start_key); - for (auto iterator = tree.Begin(index_key); iterator != tree.End(); ++iterator) { - auto location = (*iterator).second; + for (auto iter = tree.Begin(); iter != tree.End(); ++iter) { + auto pair = *iter; + auto location = pair.second; EXPECT_EQ(location.GetPageId(), 0); EXPECT_EQ(location.GetSlotNum(), current_key); - ++current_key; + current_key = current_key + 1; } EXPECT_EQ(current_key, keys.size() + 1); @@ -143,11 +143,11 @@ TEST(BPlusTreeTests, DISABLED_InsertTest3) { start_key = 3; current_key = start_key; index_key.SetFromInteger(start_key); - for (auto iterator = tree.Begin(index_key); iterator != tree.End(); ++iterator) { + for (auto iterator = tree.Begin(index_key); !iterator.IsEnd(); ++iterator) { auto location = (*iterator).second; EXPECT_EQ(location.GetPageId(), 0); EXPECT_EQ(location.GetSlotNum(), current_key); - ++current_key; + current_key = current_key + 1; } delete bpm; } diff --git a/test/storage/b_plus_tree_sequential_scale_test.cpp b/test/storage/b_plus_tree_sequential_scale_test.cpp index b0069e5ea..000103e3b 100644 --- a/test/storage/b_plus_tree_sequential_scale_test.cpp +++ b/test/storage/b_plus_tree_sequential_scale_test.cpp @@ -27,7 +27,7 @@ using bustub::DiskManagerUnlimitedMemory; /** * (Fall 2024) You should pass this test after finishing insertion and point search. */ -TEST(BPlusTreeTests, DISABLED_ScaleTest) { // NOLINT +TEST(BPlusTreeTests, DISABLED_BasicScaleTest) { // NOLINT // create KeyComparator and index schema auto key_schema = ParseCreateStatement("a bigint"); GenericComparator<8> comparator(key_schema.get()); From 70ec55c49b408b088de9258f7d22312041f8f7ca Mon Sep 17 00:00:00 2001 From: FengTDI <133572993+zlh20040308@users.noreply.github.com> Date: Sun, 17 Nov 2024 09:24:32 +0800 Subject: [PATCH 4/4] Fix typo in AddElem documentation: change 'Ddds' to 'Adds' (#768)