Skip to content

Commit

Permalink
5
Browse files Browse the repository at this point in the history
  • Loading branch information
Yukang-Lian committed Oct 19, 2023
1 parent c22fe40 commit 073ae77
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions be/test/olap/primary_key_index_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,20 @@ TEST_F(PrimaryKeyIndexTest, multiple_pages) {
row_id = index_iterator->get_current_ordinal();
EXPECT_EQ(i, row_id);
}
for (size_t i = 0; i < keys.size(); i++) {
bool exists = index_reader.check_present(keys[i]);
EXPECT_TRUE(exists);
auto status = index_iterator->seek_to_ordinal(i);
EXPECT_TRUE(status.ok());
row_id = index_iterator->get_current_ordinal();
EXPECT_EQ(i, row_id);
}
{
auto status = index_iterator->seek_to_ordinal(10);
EXPECT_TRUE(status.ok());
row_id = index_iterator->get_current_ordinal();
EXPECT_EQ(10, row_id);
}

std::vector<std::string> non_exist_keys {"00001", "00003", "00005", "00007", "00009",
"00011", "00013", "00015", "00017"};
Expand Down

0 comments on commit 073ae77

Please sign in to comment.