14
14
15
15
#include " common/internal_types.h"
16
16
#include " common/statement.h"
17
- #include " executor/abstract_executor .h"
17
+ #include " executor/logical_tile .h"
18
18
19
19
namespace peloton {
20
20
21
21
namespace concurrency {
22
22
class TransactionContext ;
23
- }
23
+ } // namespace concurrency
24
24
25
- namespace executor {
25
+ namespace type {
26
+ class Value ;
27
+ } // namespace type
26
28
27
- // ===----------------------------------------------------------------------===//
28
- // Plan Executor
29
- // ===----------------------------------------------------------------------===//
29
+ namespace executor {
30
30
31
+ /* *
32
+ * The result of the execution of a query/
33
+ */
31
34
struct ExecutionResult {
32
35
ResultType m_result;
33
36
@@ -46,14 +49,16 @@ struct ExecutionResult {
46
49
47
50
class PlanExecutor {
48
51
public:
49
- PlanExecutor () = default ;
50
- DISALLOW_COPY_AND_MOVE (PlanExecutor);
51
-
52
- /*
53
- * @brief Use std::vector<type::Value> as params to make it more elegant
54
- * for network
55
- * Before ExecutePlan, a node first receives value list, so we should
56
- * pass value list directly rather than passing Postgres's ParamListInfo
52
+ /* *
53
+ * This function executes a single query in a transactional context. The
54
+ * provided callback is called with the results of the execution with it
55
+ * completes.
56
+ *
57
+ * @param plan The physical query plan that will be run
58
+ * @param txn The transactional context the query will run in
59
+ * @param params All parameters the query references
60
+ * @param result_format No idea ...
61
+ * @param on_complete The callback function to invoke when the query finishes.
57
62
*/
58
63
static void ExecutePlan (
59
64
std::shared_ptr<planner::AbstractPlan> plan,
@@ -63,8 +68,9 @@ class PlanExecutor {
63
68
std::function<void (executor::ExecutionResult,
64
69
std::vector<ResultValue> &&)> on_complete);
65
70
66
- /*
71
+ /* *
67
72
* @brief When a peloton node recvs a query plan, this function is invoked
73
+ *
68
74
* @param plan and params
69
75
* @return the number of tuple it executes and logical_tile_list
70
76
*/
0 commit comments