Skip to content

Commit e630267

Browse files
authored
fix: store the pointer in init_check (#555)
* fix: store the pointer in init_check Signed-off-by: Alex Chi <[email protected]> * fix Signed-off-by: Alex Chi <[email protected]> --------- Signed-off-by: Alex Chi <[email protected]>
1 parent 578c927 commit e630267

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/execution/init_check_executor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
namespace bustub {
1717

18-
InitCheckExecutor::InitCheckExecutor(ExecutorContext *exec_ctx, const AbstractPlanNodeRef &plan,
18+
InitCheckExecutor::InitCheckExecutor(ExecutorContext *exec_ctx, AbstractPlanNodeRef plan,
1919
std::unique_ptr<AbstractExecutor> &&child_executor)
20-
: AbstractExecutor{exec_ctx}, plan_{plan}, child_executor_{std::move(child_executor)} {}
20+
: AbstractExecutor{exec_ctx}, plan_{std::move(plan)}, child_executor_{std::move(child_executor)} {}
2121

2222
void InitCheckExecutor::Init() {
2323
if (!child_executor_) {

src/include/execution/executors/init_check_executor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class InitCheckExecutor : public AbstractExecutor {
3232
* @param plan The init check plan to be executed
3333
* @param child_executor The child executor from which init calls are counted
3434
*/
35-
InitCheckExecutor(ExecutorContext *exec_ctx, const AbstractPlanNodeRef &plan,
35+
InitCheckExecutor(ExecutorContext *exec_ctx, AbstractPlanNodeRef plan,
3636
std::unique_ptr<AbstractExecutor> &&child_executor);
3737

3838
/** Initialize the InitCheck */
@@ -63,7 +63,7 @@ class InitCheckExecutor : public AbstractExecutor {
6363
constexpr static const bool EXECUTOR_EXHAUSTED{false};
6464

6565
/** The init check plan node to be executed */
66-
const AbstractPlanNodeRef &plan_;
66+
AbstractPlanNodeRef plan_;
6767

6868
/** The child executor from which tuples are obtained */
6969
std::unique_ptr<AbstractExecutor> child_executor_;

0 commit comments

Comments
 (0)