-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5cd883c
commit f5aec46
Showing
32 changed files
with
275 additions
and
122 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
namespace kuzu { | ||
namespace common { | ||
|
||
enum class ExplainType : uint8_t { | ||
PROFILE = 0, | ||
PHYSICAL_PLAN = 1, | ||
}; | ||
|
||
} // namespace common | ||
} // namespace kuzu |
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
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,44 @@ | ||
#pragma once | ||
|
||
#include "processor/operator/physical_operator.h" | ||
|
||
namespace kuzu { | ||
namespace processor { | ||
|
||
struct ProfileInfo { | ||
PhysicalPlan* physicalPlan; | ||
}; | ||
|
||
struct ProfileLocalState { | ||
bool hasExecuted = false; | ||
}; | ||
|
||
class Profile : public PhysicalOperator { | ||
public: | ||
Profile(DataPos outputPos, ProfileInfo info, ProfileLocalState localState, uint32_t id, | ||
const std::string& paramsString, std::unique_ptr<PhysicalOperator> child) | ||
: PhysicalOperator{PhysicalOperatorType::PROFILE, std::move(child), id, paramsString}, | ||
outputPos{outputPos}, info{std::move(info)}, localState{std::move(localState)} {} | ||
|
||
inline bool isSource() const override { return true; } | ||
|
||
inline void setPhysicalPlan(PhysicalPlan* physicalPlan) { info.physicalPlan = physicalPlan; } | ||
|
||
void initLocalStateInternal(ResultSet* resultSet, ExecutionContext* context) override; | ||
|
||
bool getNextTuplesInternal(ExecutionContext* context) override; | ||
|
||
std::unique_ptr<PhysicalOperator> clone() override { | ||
return std::make_unique<Profile>( | ||
outputPos, info, localState, id, paramsString, children[0]->clone()); | ||
} | ||
|
||
private: | ||
DataPos outputPos; | ||
ProfileInfo info; | ||
ProfileLocalState localState; | ||
common::ValueVector* outputVector; | ||
}; | ||
|
||
} // namespace processor | ||
} // namespace kuzu |
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
Oops, something went wrong.