-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdistributed_insert.hpp
More file actions
43 lines (32 loc) · 1.34 KB
/
Copy pathdistributed_insert.hpp
File metadata and controls
43 lines (32 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include "duckdb/catalog/catalog_entry/table_catalog_entry.hpp"
#include "duckdb/execution/physical_operator.hpp"
namespace duckdb {
// Physical operator that intercepts INSERT and sends to distributed server.
class PhysicalDistributedInsert : public PhysicalOperator {
public:
PhysicalDistributedInsert(PhysicalPlan &physical_plan, TableCatalogEntry &table_p, PhysicalOperator &child_operator,
idx_t estimated_cardinality);
TableCatalogEntry &table;
PhysicalOperator &child;
public:
// Sink interface.
unique_ptr<GlobalSinkState> GetGlobalSinkState(ClientContext &context) const override;
unique_ptr<LocalSinkState> GetLocalSinkState(ExecutionContext &context) const override;
SinkResultType Sink(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const override;
SinkFinalizeType Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
OperatorSinkFinalizeInput &input) const override;
bool IsSink() const override {
return true;
}
bool ParallelSink() const override {
return false;
}
// Source interface.
SourceResultType GetDataInternal(ExecutionContext &context, DataChunk &chunk,
OperatorSourceInput &input) const override;
bool IsSource() const override {
return true;
}
};
} // namespace duckdb