Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about project3 delete test #241

Closed
iiiuwioajdks opened this issue May 21, 2022 · 1 comment
Closed

question about project3 delete test #241

iiiuwioajdks opened this issue May 21, 2022 · 1 comment

Comments

@iiiuwioajdks
Copy link

in test/execution/executor_test.cpp:

TEST_F(ExecutorTest, SimpleDeleteTest) {
 ...
 // DELETE FROM test_1 WHERE col_a == 50
  const Tuple index_key = Tuple(result_set[0]);
 ...
  std::vector<RID> rids{};
  index_info->index_->ScanKey(index_key, &rids, GetTxn());
  ASSERT_TRUE(rids.empty());
}

should we change the test code to:

TEST_F(ExecutorTest, SimpleDeleteTest) {
...
 // DELETE FROM test_1 WHERE col_a == 50
  const Tuple index_key = result_set[0].KeyFromTuple(schema, *key_schema, std::vector<uint32_t>{0});
 ...
  std::vector<RID> rids{};
  index_info->index_->ScanKey(index_key, &rids, GetTxn());
  ASSERT_TRUE(rids.empty());
}
@minhdang26403
Copy link

Yes, I think we should change the code to get the index_key. This issue was resolved in the issue #195 (#195).

@cmu-db cmu-db locked and limited conversation to collaborators Aug 29, 2022
@skyzh skyzh converted this issue into discussion #301 Aug 29, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants