forked from cmu-db/peloton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cmu-db#3] Use callback to rechunk results and launch hash executor
- Loading branch information
1 parent
cc4b964
commit 9e0c41d
Showing
12 changed files
with
413 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// Peloton | ||
// | ||
// abstract_plan.h | ||
// | ||
// Identification: src/include/planner/abstract_plan.h | ||
// | ||
// Copyright (c) 2015-16, Carnegie Mellon University Database Group | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <iostream> | ||
#include <map> | ||
#include <memory> | ||
#include <vector> | ||
#include <vector> | ||
|
||
#include "catalog/schema.h" | ||
#include "common/printable.h" | ||
#include "common/serializeio.h" | ||
#include "common/serializer.h" | ||
#include "common/types.h" | ||
#include "common/value.h" | ||
|
||
namespace peloton { | ||
|
||
namespace executor { | ||
class AbstractTask; | ||
// class LogicalTile; | ||
} | ||
// | ||
// namespace catalog { | ||
// class Schema; | ||
//} | ||
// | ||
// namespace expression { | ||
// class AbstractExpression; | ||
//} | ||
|
||
namespace planner { | ||
|
||
//===--------------------------------------------------------------------===// | ||
// Abstract Callback | ||
//===--------------------------------------------------------------------===// | ||
/* | ||
* This class can be notified when a task completes | ||
* This class is used when dependency completes. Need another class for task | ||
* completion | ||
*/ | ||
class Notifiable { | ||
public: | ||
virtual ~Notifiable() {} | ||
// TODO Rename this function to Dependency complete.. | ||
virtual void TaskComplete(std::shared_ptr<executor::AbstractTask> task) = 0; | ||
}; | ||
|
||
} // namespace planner | ||
} // namespace peloton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// Peloton | ||
// | ||
// parallel_hash_join_plan.h | ||
// | ||
// Identification: src/include/planner/parallel_hash_join_plan.h | ||
// | ||
// Copyright (c) 2015-16, Carnegie Mellon University Database Group | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include "planner/abstract_join_plan.h" | ||
|
||
namespace peloton { | ||
namespace expression { | ||
class AbstractExpression; | ||
} | ||
namespace planner { | ||
|
||
class ParallelHashJoinPlan : public AbstractJoinPlan { | ||
public: | ||
ParallelHashJoinPlan(const ParallelHashJoinPlan &) = delete; | ||
ParallelHashJoinPlan &operator=(const ParallelHashJoinPlan &) = delete; | ||
ParallelHashJoinPlan(ParallelHashJoinPlan &&) = delete; | ||
ParallelHashJoinPlan &operator=(ParallelHashJoinPlan &&) = delete; | ||
|
||
ParallelHashJoinPlan( | ||
PelotonJoinType join_type, | ||
std::unique_ptr<const expression::AbstractExpression> &&predicate, | ||
std::unique_ptr<const ProjectInfo> &&proj_info, | ||
std::shared_ptr<const catalog::Schema> &proj_schema); | ||
|
||
ParallelHashJoinPlan( | ||
PelotonJoinType join_type, | ||
std::unique_ptr<const expression::AbstractExpression> &&predicate, | ||
std::unique_ptr<const ProjectInfo> &&proj_info, | ||
std::shared_ptr<const catalog::Schema> &proj_schema, | ||
const std::vector<oid_t> &outer_hashkeys); | ||
|
||
inline PlanNodeType GetPlanNodeType() const { | ||
return PLAN_NODE_TYPE_PARALLEL_HASHJOIN; | ||
} | ||
|
||
const std::string GetInfo() const { return "ParallelHashJoin"; } | ||
|
||
const std::vector<oid_t> &GetOuterHashIds() const { | ||
return outer_column_ids_; | ||
} | ||
|
||
std::unique_ptr<AbstractPlan> Copy() const { | ||
std::unique_ptr<const expression::AbstractExpression> predicate_copy( | ||
GetPredicate()->Copy()); | ||
std::shared_ptr<const catalog::Schema> schema_copy( | ||
catalog::Schema::CopySchema(GetSchema())); | ||
ParallelHashJoinPlan *new_plan = new ParallelHashJoinPlan( | ||
GetJoinType(), std::move(predicate_copy), | ||
std::move(GetProjInfo()->Copy()), schema_copy, outer_column_ids_); | ||
return std::unique_ptr<AbstractPlan>(new_plan); | ||
} | ||
|
||
private: | ||
std::vector<oid_t> outer_column_ids_; | ||
}; | ||
|
||
} // namespace planner | ||
} // namespace peloton |
Oops, something went wrong.