-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabstract_executor.h
More file actions
44 lines (38 loc) · 1.18 KB
/
Copy pathabstract_executor.h
File metadata and controls
44 lines (38 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//===----------------------------------------------------------------------===//
//
// BusTub
//
// abstract_executor.h
//
// Identification: src/include/execution/executors/abstract_executor.h
//
// Copyright (c) 2015-2021, Carnegie Mellon University Database Group
//
//===----------------------------------------------------------------------===//
#pragma once
#include "storage.h"
/**
* The AbstractExecutor implements the Volcano tuple-at-a-time iterator model.
* This is the base class from which all executors in the project, and defines
* the minimal interface that all executors support.
*/
class AbstractExecutor {
public:
/**
* Construct a new AbstractExecutor instance.
*/
explicit AbstractExecutor(){};
/** Virtual destructor. */
virtual ~AbstractExecutor() = default;
/**
* Initialize the executor.
* @warning This function must be called before Next() is called!
*/
virtual void Init() = 0;
/**
* Yield the next tuple from this executor.
* @param[out] tuple The next tuple produced by this executor
* @return `true` if a tuple was produced, `false` if there are no more tuples
*/
virtual bool Next(Tuple *tuple) = 0;
};