-
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
0248f05
commit e524ab5
Showing
39 changed files
with
903 additions
and
116 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
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,40 @@ | ||
#pragma once | ||
|
||
#include "processor/operator/copy/copy.h" | ||
#include "storage/store/nodes_store.h" | ||
|
||
namespace kuzu { | ||
namespace processor { | ||
|
||
class CopyNPY : public Copy { | ||
public: | ||
CopyNPY(catalog::Catalog* catalog, const common::CopyDescription& copyDescription, | ||
storage::NodeTable* table, storage::WAL* wal, | ||
storage::NodesStatisticsAndDeletedIDs* nodesStatistics, storage::RelsStore& relsStore, | ||
uint32_t id, const std::string& paramsString) | ||
: Copy{PhysicalOperatorType::COPY_NPY, catalog, copyDescription, table->getTableID(), wal, | ||
id, paramsString}, | ||
table{table}, nodesStatistics{nodesStatistics}, relsStore{relsStore} {} | ||
|
||
std::unique_ptr<PhysicalOperator> clone() override { | ||
return std::make_unique<CopyNPY>( | ||
catalog, copyDescription, table, wal, nodesStatistics, relsStore, id, paramsString); | ||
} | ||
|
||
protected: | ||
uint64_t executeInternal( | ||
common::TaskScheduler* taskScheduler, ExecutionContext* executionContext) override; | ||
|
||
private: | ||
inline bool isCopyAllowed() override { | ||
return nodesStatistics->getNodeStatisticsAndDeletedIDs(tableID)->getNumTuples() == 0; | ||
} | ||
|
||
private: | ||
storage::NodeTable* table; | ||
storage::NodesStatisticsAndDeletedIDs* nodesStatistics; | ||
storage::RelsStore& relsStore; | ||
}; | ||
|
||
} // namespace processor | ||
} // namespace kuzu |
Oops, something went wrong.