-
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.
Support COPY TO to write query result to .csv file
- Loading branch information
Showing
42 changed files
with
3,448 additions
and
2,759 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
#include <unordered_map> | ||
#include <vector> | ||
|
||
#include "binder/bound_statement.h" | ||
#include "binder/query/bound_regular_query.h" | ||
#include "catalog/catalog_structs.h" | ||
#include "common/copier_config/copier_config.h" | ||
|
||
namespace kuzu { | ||
namespace binder { | ||
|
||
class BoundCopyTo : public BoundStatement { | ||
public: | ||
BoundCopyTo( | ||
common::CopyDescription copyDescription, std::unique_ptr<BoundRegularQuery> regularQuery) | ||
: BoundStatement{common::StatementType::COPY_TO, BoundStatementResult::createEmptyResult()}, | ||
regularQuery{std::move(regularQuery)}, copyDescription{std::move(copyDescription)} {} | ||
|
||
inline common::CopyDescription getCopyDescription() const { return copyDescription; } | ||
|
||
inline BoundRegularQuery* getRegularQuery() const { return regularQuery.get(); } | ||
|
||
inline common::table_id_t getTableID() const { return tableID; } | ||
|
||
inline std::string getTableName() const { return tableName; } | ||
|
||
private: | ||
common::CopyDescription copyDescription; | ||
common::table_id_t tableID; | ||
std::string tableName; | ||
std::unique_ptr<BoundRegularQuery> regularQuery; | ||
}; | ||
|
||
} // namespace binder | ||
} // 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.