1 | #include "duckdb/planner/operator/logical_dummy_scan.hpp" |
---|---|
2 | |
3 | #include "duckdb/common/field_writer.hpp" |
4 | #include "duckdb/main/config.hpp" |
5 | |
6 | namespace duckdb { |
7 | |
8 | void LogicalDummyScan::Serialize(FieldWriter &writer) const { |
9 | writer.WriteField(element: table_index); |
10 | } |
11 | |
12 | unique_ptr<LogicalOperator> LogicalDummyScan::Deserialize(LogicalDeserializationState &state, FieldReader &reader) { |
13 | auto table_index = reader.ReadRequired<idx_t>(); |
14 | return make_uniq<LogicalDummyScan>(args&: table_index); |
15 | } |
16 | |
17 | vector<idx_t> LogicalDummyScan::GetTableIndex() const { |
18 | return vector<idx_t> {table_index}; |
19 | } |
20 | |
21 | string LogicalDummyScan::GetName() const { |
22 | #ifdef DEBUG |
23 | if (DBConfigOptions::debug_print_bindings) { |
24 | return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index); |
25 | } |
26 | #endif |
27 | return LogicalOperator::GetName(); |
28 | } |
29 | |
30 | } // namespace duckdb |
31 |