duckdb 0.8.2-dev1968.0 → 0.8.2-dev2068.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure.py +7 -2
- package/package.json +1 -1
- package/src/duckdb/src/catalog/catalog.cpp +1 -1
- package/src/duckdb/src/catalog/catalog_entry/index_catalog_entry.cpp +17 -41
- package/src/duckdb/src/catalog/catalog_entry/macro_catalog_entry.cpp +2 -10
- package/src/duckdb/src/catalog/catalog_entry/schema_catalog_entry.cpp +4 -14
- package/src/duckdb/src/catalog/catalog_entry/sequence_catalog_entry.cpp +11 -28
- package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +11 -38
- package/src/duckdb/src/catalog/catalog_entry/view_catalog_entry.cpp +11 -27
- package/src/duckdb/src/catalog/catalog_entry.cpp +25 -1
- package/src/duckdb/src/common/adbc/adbc.cpp +18 -4
- package/src/duckdb/src/common/enum_util.cpp +159 -0
- package/src/duckdb/src/common/extra_type_info.cpp +1 -2
- package/src/duckdb/src/common/serializer/binary_deserializer.cpp +3 -0
- package/src/duckdb/src/common/serializer/binary_serializer.cpp +4 -4
- package/src/duckdb/src/common/types/column/column_data_collection.cpp +43 -0
- package/src/duckdb/src/common/types/vector.cpp +1 -1
- package/src/duckdb/src/common/types.cpp +0 -12
- package/src/duckdb/src/execution/physical_plan/plan_comparison_join.cpp +1 -1
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/index_catalog_entry.hpp +1 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/macro_catalog_entry.hpp +1 -4
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/schema_catalog_entry.hpp +2 -5
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/sequence_catalog_entry.hpp +1 -6
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_catalog_entry.hpp +2 -11
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/view_catalog_entry.hpp +2 -5
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry.hpp +14 -0
- package/src/duckdb/src/include/duckdb/common/assert.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/constants.hpp +2 -0
- package/src/duckdb/src/include/duckdb/common/enum_util.hpp +32 -0
- package/src/duckdb/src/include/duckdb/common/enums/index_type.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/index_vector.hpp +12 -0
- package/src/duckdb/src/include/duckdb/common/serializer/binary_deserializer.hpp +28 -4
- package/src/duckdb/src/include/duckdb/common/serializer/binary_serializer.hpp +12 -5
- package/src/duckdb/src/include/duckdb/common/serializer/deserialization_data.hpp +110 -0
- package/src/duckdb/src/include/duckdb/common/serializer/format_deserializer.hpp +46 -1
- package/src/duckdb/src/include/duckdb/common/serializer/format_serializer.hpp +23 -21
- package/src/duckdb/src/include/duckdb/common/serializer/serialization_traits.hpp +12 -4
- package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp +3 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/math_functions.hpp +3 -3
- package/src/duckdb/src/include/duckdb/function/macro_function.hpp +3 -0
- package/src/duckdb/src/include/duckdb/function/scalar_macro_function.hpp +3 -0
- package/src/duckdb/src/include/duckdb/function/table_macro_function.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/column_definition.hpp +6 -5
- package/src/duckdb/src/include/duckdb/parser/column_list.hpp +4 -0
- package/src/duckdb/src/include/duckdb/parser/constraint.hpp +5 -0
- package/src/duckdb/src/include/duckdb/parser/constraints/check_constraint.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/constraints/foreign_key_constraint.hpp +6 -0
- package/src/duckdb/src/include/duckdb/parser/constraints/not_null_constraint.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/constraints/unique_constraint.hpp +6 -0
- package/src/duckdb/src/include/duckdb/parser/expression/between_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/case_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/cast_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/collate_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/columnref_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/comparison_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/conjunction_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/constant_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/default_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/function_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/lambda_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/operator_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/parameter_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/positional_reference_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/star_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/subquery_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/window_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_info.hpp +12 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_table_info.hpp +66 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_data/attach_info.hpp +8 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/copy_info.hpp +8 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_index_info.hpp +4 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_info.hpp +9 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_macro_info.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_schema_info.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_sequence_info.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_table_info.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_type_info.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_view_info.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/detach_info.hpp +7 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/drop_info.hpp +7 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/exported_table_data.hpp +7 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/load_info.hpp +13 -3
- package/src/duckdb/src/include/duckdb/parser/parsed_data/parse_info.hpp +22 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/pragma_info.hpp +10 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/show_select_info.hpp +7 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/transaction_info.hpp +10 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/vacuum_info.hpp +10 -0
- package/src/duckdb/src/include/duckdb/planner/bound_constraint.hpp +0 -8
- package/src/duckdb/src/include/duckdb/planner/bound_result_modifier.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/column_binding.hpp +5 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_between_expression.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_case_expression.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_cast_expression.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_columnref_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_comparison_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_conjunction_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_constant_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_default_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_lambda_expression.hpp +3 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_lambdaref_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_operator_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_parameter_data.hpp +5 -2
- package/src/duckdb/src/include/duckdb/planner/expression/bound_parameter_expression.hpp +7 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_reference_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_unnest_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/expression/list.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/joinside.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/logical_operator.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_aggregate.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_any_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_column_data_get.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_comparison_join.hpp +9 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create.hpp +9 -6
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create_index.hpp +2 -16
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create_table.hpp +10 -6
- package/src/duckdb/src/include/duckdb/planner/operator/logical_cross_product.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_cteref.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delete.hpp +7 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delim_get.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_distinct.hpp +6 -10
- package/src/duckdb/src/include/duckdb/planner/operator/logical_dummy_scan.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_empty_result.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_explain.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_expression_get.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_filter.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_insert.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_limit.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_limit_percent.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_materialized_cte.hpp +5 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_order.hpp +7 -35
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pivot.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_positional_join.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_projection.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_recursive_cte.hpp +5 -3
- package/src/duckdb/src/include/duckdb/planner/operator/logical_reset.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_sample.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_set.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_set_operation.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_show.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_simple.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_top_n.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_unnest.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_update.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_window.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_pivotref.hpp +3 -0
- package/src/duckdb/src/optimizer/deliminator.cpp +5 -3
- package/src/duckdb/src/parser/column_definition.cpp +20 -32
- package/src/duckdb/src/parser/column_list.cpp +8 -0
- package/src/duckdb/src/parser/constraints/foreign_key_constraint.cpp +3 -0
- package/src/duckdb/src/parser/constraints/unique_constraint.cpp +3 -0
- package/src/duckdb/src/parser/expression/case_expression.cpp +0 -12
- package/src/duckdb/src/parser/parsed_data/alter_info.cpp +5 -2
- package/src/duckdb/src/parser/parsed_data/alter_table_info.cpp +38 -0
- package/src/duckdb/src/parser/parsed_data/create_index_info.cpp +3 -1
- package/src/duckdb/src/parser/parsed_data/create_sequence_info.cpp +2 -0
- package/src/duckdb/src/parser/parsed_data/detach_info.cpp +1 -1
- package/src/duckdb/src/parser/parsed_data/drop_info.cpp +1 -1
- package/src/duckdb/src/parser/parsed_data/sample_options.cpp +0 -18
- package/src/duckdb/src/parser/parsed_data/transaction_info.cpp +4 -1
- package/src/duckdb/src/parser/parsed_data/vacuum_info.cpp +1 -1
- package/src/duckdb/src/parser/query_node.cpp +0 -10
- package/src/duckdb/src/parser/result_modifier.cpp +0 -13
- package/src/duckdb/src/parser/statement/select_statement.cpp +0 -10
- package/src/duckdb/src/parser/tableref/pivotref.cpp +0 -16
- package/src/duckdb/src/parser/transform/statement/transform_create_index.cpp +5 -4
- package/src/duckdb/src/planner/binder/query_node/plan_subquery.cpp +1 -1
- package/src/duckdb/src/planner/binder/statement/bind_create.cpp +6 -1
- package/src/duckdb/src/planner/expression/bound_between_expression.cpp +4 -0
- package/src/duckdb/src/planner/expression/bound_cast_expression.cpp +13 -6
- package/src/duckdb/src/planner/expression/bound_parameter_expression.cpp +20 -12
- package/src/duckdb/src/planner/expression/bound_window_expression.cpp +1 -4
- package/src/duckdb/src/planner/logical_operator.cpp +13 -1
- package/src/duckdb/src/planner/operator/logical_comparison_join.cpp +16 -2
- package/src/duckdb/src/planner/operator/logical_create.cpp +14 -0
- package/src/duckdb/src/planner/operator/logical_create_index.cpp +20 -0
- package/src/duckdb/src/planner/operator/logical_create_table.cpp +16 -0
- package/src/duckdb/src/planner/operator/logical_delete.cpp +9 -2
- package/src/duckdb/src/planner/operator/logical_delim_join.cpp +2 -4
- package/src/duckdb/src/planner/operator/logical_distinct.cpp +13 -0
- package/src/duckdb/src/planner/operator/logical_explain.cpp +1 -1
- package/src/duckdb/src/planner/operator/logical_insert.cpp +8 -2
- package/src/duckdb/src/planner/operator/logical_materialized_cte.cpp +3 -2
- package/src/duckdb/src/planner/operator/logical_order.cpp +39 -0
- package/src/duckdb/src/planner/operator/logical_pivot.cpp +3 -0
- package/src/duckdb/src/planner/operator/logical_recursive_cte.cpp +5 -5
- package/src/duckdb/src/planner/operator/logical_sample.cpp +3 -0
- package/src/duckdb/src/planner/operator/logical_update.cpp +8 -2
- package/src/duckdb/src/planner/parsed_data/bound_create_table_info.cpp +4 -2
- package/src/duckdb/src/planner/planner.cpp +11 -0
- package/src/duckdb/src/storage/checkpoint_manager.cpp +23 -23
- package/src/duckdb/src/storage/serialization/serialize_constraint.cpp +98 -0
- package/src/duckdb/src/storage/serialization/serialize_create_info.cpp +188 -0
- package/src/duckdb/src/storage/serialization/serialize_expression.cpp +274 -0
- package/src/duckdb/src/storage/serialization/serialize_logical_operator.cpp +729 -0
- package/src/duckdb/src/storage/serialization/serialize_macro_function.cpp +62 -0
- package/src/duckdb/src/storage/serialization/serialize_nodes.cpp +242 -0
- package/src/duckdb/src/storage/serialization/serialize_parse_info.cpp +419 -0
- package/src/duckdb/src/storage/serialization/serialize_parsed_expression.cpp +40 -38
- package/src/duckdb/src/storage/serialization/serialize_query_node.cpp +36 -36
- package/src/duckdb/src/storage/serialization/serialize_result_modifier.cpp +25 -14
- package/src/duckdb/src/storage/serialization/serialize_statement.cpp +22 -0
- package/src/duckdb/src/storage/serialization/serialize_tableref.cpp +47 -47
- package/src/duckdb/src/storage/serialization/serialize_types.cpp +25 -25
- package/src/duckdb/src/storage/storage_info.cpp +3 -2
- package/src/duckdb/src/storage/wal_replay.cpp +20 -19
- package/src/duckdb/third_party/concurrentqueue/lightweightsemaphore.h +3 -76
- package/src/duckdb/third_party/libpg_query/pg_functions.cpp +13 -0
- package/src/duckdb/third_party/libpg_query/src_backend_parser_scansup.cpp +9 -0
- package/src/duckdb/ub_src_parser.cpp +0 -2
- package/src/duckdb/ub_src_storage_serialization.cpp +16 -0
- package/src/duckdb/src/parser/common_table_expression_info.cpp +0 -21
@@ -4,6 +4,45 @@
|
|
4
4
|
|
5
5
|
namespace duckdb {
|
6
6
|
|
7
|
+
LogicalOrder::LogicalOrder(vector<BoundOrderByNode> orders)
|
8
|
+
: LogicalOperator(LogicalOperatorType::LOGICAL_ORDER_BY), orders(std::move(orders)) {
|
9
|
+
}
|
10
|
+
|
11
|
+
vector<ColumnBinding> LogicalOrder::GetColumnBindings() {
|
12
|
+
auto child_bindings = children[0]->GetColumnBindings();
|
13
|
+
if (projections.empty()) {
|
14
|
+
return child_bindings;
|
15
|
+
}
|
16
|
+
|
17
|
+
vector<ColumnBinding> result;
|
18
|
+
for (auto &col_idx : projections) {
|
19
|
+
result.push_back(child_bindings[col_idx]);
|
20
|
+
}
|
21
|
+
return result;
|
22
|
+
}
|
23
|
+
|
24
|
+
string LogicalOrder::ParamsToString() const {
|
25
|
+
string result = "ORDERS:\n";
|
26
|
+
for (idx_t i = 0; i < orders.size(); i++) {
|
27
|
+
if (i > 0) {
|
28
|
+
result += "\n";
|
29
|
+
}
|
30
|
+
result += orders[i].expression->GetName();
|
31
|
+
}
|
32
|
+
return result;
|
33
|
+
}
|
34
|
+
|
35
|
+
void LogicalOrder::ResolveTypes() {
|
36
|
+
const auto child_types = children[0]->types;
|
37
|
+
if (projections.empty()) {
|
38
|
+
types = child_types;
|
39
|
+
} else {
|
40
|
+
for (auto &col_idx : projections) {
|
41
|
+
types.push_back(child_types[col_idx]);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
7
46
|
void LogicalOrder::Serialize(FieldWriter &writer) const {
|
8
47
|
writer.WriteRegularSerializableList(orders);
|
9
48
|
writer.WriteList<idx_t>(projections);
|
@@ -4,6 +4,9 @@
|
|
4
4
|
|
5
5
|
namespace duckdb {
|
6
6
|
|
7
|
+
LogicalPivot::LogicalPivot() : LogicalOperator(LogicalOperatorType::LOGICAL_PIVOT) {
|
8
|
+
}
|
9
|
+
|
7
10
|
LogicalPivot::LogicalPivot(idx_t pivot_idx, unique_ptr<LogicalOperator> plan, BoundPivotInfo info_p)
|
8
11
|
: LogicalOperator(LogicalOperatorType::LOGICAL_PIVOT), pivot_index(pivot_idx), bound_pivot(std::move(info_p)) {
|
9
12
|
D_ASSERT(plan);
|
@@ -12,11 +12,11 @@ void LogicalRecursiveCTE::Serialize(FieldWriter &writer) const {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
unique_ptr<LogicalOperator> LogicalRecursiveCTE::Deserialize(LogicalDeserializationState &state, FieldReader &reader) {
|
15
|
-
auto
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
return
|
15
|
+
auto result = unique_ptr<LogicalRecursiveCTE>(new LogicalRecursiveCTE());
|
16
|
+
result->table_index = reader.ReadRequired<idx_t>();
|
17
|
+
result->column_count = reader.ReadRequired<idx_t>();
|
18
|
+
result->union_all = reader.ReadRequired<bool>();
|
19
|
+
return std::move(result);
|
20
20
|
}
|
21
21
|
|
22
22
|
vector<idx_t> LogicalRecursiveCTE::GetTableIndex() const {
|
@@ -3,6 +3,9 @@
|
|
3
3
|
|
4
4
|
namespace duckdb {
|
5
5
|
|
6
|
+
LogicalSample::LogicalSample() : LogicalOperator(LogicalOperatorType::LOGICAL_SAMPLE) {
|
7
|
+
}
|
8
|
+
|
6
9
|
LogicalSample::LogicalSample(unique_ptr<SampleOptions> sample_options_p, unique_ptr<LogicalOperator> child)
|
7
10
|
: LogicalOperator(LogicalOperatorType::LOGICAL_SAMPLE), sample_options(std::move(sample_options_p)) {
|
8
11
|
children.push_back(std::move(child));
|
@@ -10,6 +10,11 @@ LogicalUpdate::LogicalUpdate(TableCatalogEntry &table)
|
|
10
10
|
: LogicalOperator(LogicalOperatorType::LOGICAL_UPDATE), table(table), table_index(0), return_chunk(false) {
|
11
11
|
}
|
12
12
|
|
13
|
+
LogicalUpdate::LogicalUpdate(ClientContext &context, const string &catalog, const string &schema, const string &table)
|
14
|
+
: LogicalOperator(LogicalOperatorType::LOGICAL_UPDATE),
|
15
|
+
table(Catalog::GetEntry<TableCatalogEntry>(context, catalog, schema, table)) {
|
16
|
+
}
|
17
|
+
|
13
18
|
void LogicalUpdate::Serialize(FieldWriter &writer) const {
|
14
19
|
table.Serialize(writer.GetSerializer());
|
15
20
|
writer.WriteField(table_index);
|
@@ -22,10 +27,11 @@ void LogicalUpdate::Serialize(FieldWriter &writer) const {
|
|
22
27
|
|
23
28
|
unique_ptr<LogicalOperator> LogicalUpdate::Deserialize(LogicalDeserializationState &state, FieldReader &reader) {
|
24
29
|
auto &context = state.gstate.context;
|
25
|
-
auto info = TableCatalogEntry::Deserialize(reader.GetSource()
|
30
|
+
auto info = TableCatalogEntry::Deserialize(reader.GetSource());
|
26
31
|
auto &catalog = Catalog::GetCatalog(context, info->catalog);
|
27
32
|
|
28
|
-
auto &table_catalog_entry =
|
33
|
+
auto &table_catalog_entry =
|
34
|
+
catalog.GetEntry<TableCatalogEntry>(context, info->schema, info->Cast<CreateTableInfo>().table);
|
29
35
|
auto result = make_uniq<LogicalUpdate>(table_catalog_entry);
|
30
36
|
result->table_index = reader.ReadRequired<idx_t>();
|
31
37
|
result->return_chunk = reader.ReadRequired<bool>();
|
@@ -2,8 +2,11 @@
|
|
2
2
|
#include "duckdb/parser/parsed_data/create_schema_info.hpp"
|
3
3
|
#include "duckdb/catalog/catalog_entry/schema_catalog_entry.hpp"
|
4
4
|
#include "duckdb/common/field_writer.hpp"
|
5
|
+
#include "duckdb/common/serializer/format_serializer.hpp"
|
6
|
+
#include "duckdb/common/serializer/format_deserializer.hpp"
|
5
7
|
|
6
8
|
namespace duckdb {
|
9
|
+
|
7
10
|
void BoundCreateTableInfo::Serialize(Serializer &serializer) const {
|
8
11
|
serializer.WriteOptional(base);
|
9
12
|
}
|
@@ -11,10 +14,9 @@ void BoundCreateTableInfo::Serialize(Serializer &serializer) const {
|
|
11
14
|
unique_ptr<BoundCreateTableInfo> BoundCreateTableInfo::Deserialize(Deserializer &source,
|
12
15
|
PlanDeserializationState &state) {
|
13
16
|
auto info = source.ReadOptional<CreateInfo>();
|
14
|
-
auto schema_name = info->schema;
|
15
|
-
auto catalog = info->catalog;
|
16
17
|
auto binder = Binder::CreateBinder(state.context);
|
17
18
|
auto bound_info = binder->BindCreateTableInfo(std::move(info));
|
18
19
|
return bound_info;
|
19
20
|
}
|
21
|
+
|
20
22
|
} // namespace duckdb
|
@@ -11,6 +11,8 @@
|
|
11
11
|
#include "duckdb/planner/binder.hpp"
|
12
12
|
#include "duckdb/planner/expression/bound_parameter_expression.hpp"
|
13
13
|
#include "duckdb/transaction/meta_transaction.hpp"
|
14
|
+
#include "duckdb/common/serializer/binary_serializer.hpp"
|
15
|
+
#include "duckdb/common/serializer/binary_deserializer.hpp"
|
14
16
|
|
15
17
|
namespace duckdb {
|
16
18
|
|
@@ -164,6 +166,15 @@ void Planner::VerifyPlan(ClientContext &context, unique_ptr<LogicalOperator> &op
|
|
164
166
|
return;
|
165
167
|
}
|
166
168
|
|
169
|
+
// format (de)serialization of this operator
|
170
|
+
try {
|
171
|
+
auto blob = BinarySerializer::Serialize(*op);
|
172
|
+
bound_parameter_map_t parameters;
|
173
|
+
auto result = BinaryDeserializer::Deserialize<LogicalOperator>(context, parameters, blob.data(), blob.size());
|
174
|
+
} catch (SerializationException &ex) {
|
175
|
+
// pass
|
176
|
+
}
|
177
|
+
|
167
178
|
BufferedSerializer serializer;
|
168
179
|
serializer.is_query_plan = true;
|
169
180
|
try {
|
@@ -254,10 +254,10 @@ void CheckpointWriter::WriteSchema(SchemaCatalogEntry &schema) {
|
|
254
254
|
|
255
255
|
void CheckpointReader::ReadSchema(ClientContext &context, MetaBlockReader &reader) {
|
256
256
|
// read the schema and create it in the catalog
|
257
|
-
auto info =
|
257
|
+
auto info = CatalogEntry::Deserialize(reader);
|
258
258
|
// we set create conflict to ignore to ignore the failure of recreating the main schema
|
259
259
|
info->on_conflict = OnCreateConflict::IGNORE_ON_CONFLICT;
|
260
|
-
catalog.CreateSchema(context,
|
260
|
+
catalog.CreateSchema(context, info->Cast<CreateSchemaInfo>());
|
261
261
|
|
262
262
|
// first read all the counts
|
263
263
|
FieldReader field_reader(reader);
|
@@ -309,8 +309,8 @@ void CheckpointWriter::WriteView(ViewCatalogEntry &view) {
|
|
309
309
|
}
|
310
310
|
|
311
311
|
void CheckpointReader::ReadView(ClientContext &context, MetaBlockReader &reader) {
|
312
|
-
auto info =
|
313
|
-
catalog.CreateView(context,
|
312
|
+
auto info = CatalogEntry::Deserialize(reader);
|
313
|
+
catalog.CreateView(context, info->Cast<CreateViewInfo>());
|
314
314
|
}
|
315
315
|
|
316
316
|
//===--------------------------------------------------------------------===//
|
@@ -322,7 +322,7 @@ void CheckpointWriter::WriteSequence(SequenceCatalogEntry &seq) {
|
|
322
322
|
|
323
323
|
void CheckpointReader::ReadSequence(ClientContext &context, MetaBlockReader &reader) {
|
324
324
|
auto info = SequenceCatalogEntry::Deserialize(reader);
|
325
|
-
catalog.CreateSequence(context,
|
325
|
+
catalog.CreateSequence(context, info->Cast<CreateSequenceInfo>());
|
326
326
|
}
|
327
327
|
|
328
328
|
//===--------------------------------------------------------------------===//
|
@@ -341,13 +341,14 @@ void CheckpointWriter::WriteIndex(IndexCatalogEntry &index_catalog) {
|
|
341
341
|
|
342
342
|
void CheckpointReader::ReadIndex(ClientContext &context, MetaBlockReader &reader) {
|
343
343
|
// deserialize the index metadata
|
344
|
-
auto info = IndexCatalogEntry::Deserialize(reader
|
344
|
+
auto info = IndexCatalogEntry::Deserialize(reader);
|
345
|
+
auto &index_info = info->Cast<CreateIndexInfo>();
|
345
346
|
|
346
347
|
// create the index in the catalog
|
347
348
|
auto &schema_catalog = catalog.GetSchema(context, info->schema);
|
348
|
-
auto &table_catalog =
|
349
|
-
|
350
|
-
auto &index_catalog = schema_catalog.CreateIndex(context,
|
349
|
+
auto &table_catalog =
|
350
|
+
catalog.GetEntry(context, CatalogType::TABLE_ENTRY, info->schema, index_info.table).Cast<DuckTableEntry>();
|
351
|
+
auto &index_catalog = schema_catalog.CreateIndex(context, index_info, table_catalog)->Cast<DuckIndexEntry>();
|
351
352
|
index_catalog.info = table_catalog.GetStorage().info;
|
352
353
|
|
353
354
|
// we deserialize the index lazily, i.e., we do not need to load any node information
|
@@ -358,7 +359,7 @@ void CheckpointReader::ReadIndex(ClientContext &context, MetaBlockReader &reader
|
|
358
359
|
// obtain the expressions of the ART from the index metadata
|
359
360
|
vector<unique_ptr<Expression>> unbound_expressions;
|
360
361
|
vector<unique_ptr<ParsedExpression>> parsed_expressions;
|
361
|
-
for (auto &p_exp :
|
362
|
+
for (auto &p_exp : index_info.parsed_expressions) {
|
362
363
|
parsed_expressions.push_back(p_exp->Copy());
|
363
364
|
}
|
364
365
|
|
@@ -372,8 +373,7 @@ void CheckpointReader::ReadIndex(ClientContext &context, MetaBlockReader &reader
|
|
372
373
|
column_names.push_back(col.Name());
|
373
374
|
}
|
374
375
|
vector<column_t> column_ids;
|
375
|
-
binder->bind_context.AddBaseTable(0,
|
376
|
-
&table_catalog);
|
376
|
+
binder->bind_context.AddBaseTable(0, index_info.table, column_names, column_types, column_ids, &table_catalog);
|
377
377
|
IndexBinder idx_binder(*binder, context);
|
378
378
|
unbound_expressions.reserve(parsed_expressions.size());
|
379
379
|
for (auto &expr : parsed_expressions) {
|
@@ -382,20 +382,20 @@ void CheckpointReader::ReadIndex(ClientContext &context, MetaBlockReader &reader
|
|
382
382
|
|
383
383
|
if (parsed_expressions.empty()) {
|
384
384
|
// this is a PK/FK index: we create the necessary bound column ref expressions
|
385
|
-
unbound_expressions.reserve(
|
386
|
-
for (idx_t key_nr = 0; key_nr <
|
387
|
-
auto &col = table_catalog.GetColumn(LogicalIndex(
|
385
|
+
unbound_expressions.reserve(index_info.column_ids.size());
|
386
|
+
for (idx_t key_nr = 0; key_nr < index_info.column_ids.size(); key_nr++) {
|
387
|
+
auto &col = table_catalog.GetColumn(LogicalIndex(index_info.column_ids[key_nr]));
|
388
388
|
unbound_expressions.push_back(
|
389
389
|
make_uniq<BoundColumnRefExpression>(col.GetName(), col.GetType(), ColumnBinding(0, key_nr)));
|
390
390
|
}
|
391
391
|
}
|
392
392
|
|
393
393
|
// create the index and add it to the storage
|
394
|
-
switch (
|
394
|
+
switch (index_info.index_type) {
|
395
395
|
case IndexType::ART: {
|
396
396
|
auto &storage = table_catalog.GetStorage();
|
397
|
-
auto art = make_uniq<ART>(
|
398
|
-
|
397
|
+
auto art = make_uniq<ART>(index_info.column_ids, TableIOManager::Get(storage), std::move(unbound_expressions),
|
398
|
+
index_info.constraint_type, storage.db, root_block_id, root_offset);
|
399
399
|
index_catalog.index = art.get();
|
400
400
|
storage.info->indexes.AddIndex(std::move(art));
|
401
401
|
break;
|
@@ -428,8 +428,8 @@ void CheckpointWriter::WriteMacro(ScalarMacroCatalogEntry ¯o) {
|
|
428
428
|
}
|
429
429
|
|
430
430
|
void CheckpointReader::ReadMacro(ClientContext &context, MetaBlockReader &reader) {
|
431
|
-
auto info = MacroCatalogEntry::Deserialize(reader
|
432
|
-
catalog.CreateFunction(context,
|
431
|
+
auto info = MacroCatalogEntry::Deserialize(reader);
|
432
|
+
catalog.CreateFunction(context, info->Cast<CreateMacroInfo>());
|
433
433
|
}
|
434
434
|
|
435
435
|
void CheckpointWriter::WriteTableMacro(TableMacroCatalogEntry ¯o) {
|
@@ -437,8 +437,8 @@ void CheckpointWriter::WriteTableMacro(TableMacroCatalogEntry ¯o) {
|
|
437
437
|
}
|
438
438
|
|
439
439
|
void CheckpointReader::ReadTableMacro(ClientContext &context, MetaBlockReader &reader) {
|
440
|
-
auto info = MacroCatalogEntry::Deserialize(reader
|
441
|
-
catalog.CreateFunction(context,
|
440
|
+
auto info = MacroCatalogEntry::Deserialize(reader);
|
441
|
+
catalog.CreateFunction(context, info->Cast<CreateMacroInfo>());
|
442
442
|
}
|
443
443
|
|
444
444
|
//===--------------------------------------------------------------------===//
|
@@ -455,7 +455,7 @@ void CheckpointWriter::WriteTable(TableCatalogEntry &table) {
|
|
455
455
|
|
456
456
|
void CheckpointReader::ReadTable(ClientContext &context, MetaBlockReader &reader) {
|
457
457
|
// deserialize the table meta data
|
458
|
-
auto info = TableCatalogEntry::Deserialize(reader
|
458
|
+
auto info = TableCatalogEntry::Deserialize(reader);
|
459
459
|
// bind the info
|
460
460
|
auto binder = Binder::CreateBinder(context);
|
461
461
|
auto &schema = catalog.GetSchema(context, info->schema);
|
@@ -0,0 +1,98 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// This file is automatically generated by scripts/generate_serialization.py
|
3
|
+
// Do not edit this file manually, your changes will be overwritten
|
4
|
+
//===----------------------------------------------------------------------===//
|
5
|
+
|
6
|
+
#include "duckdb/common/serializer/format_serializer.hpp"
|
7
|
+
#include "duckdb/common/serializer/format_deserializer.hpp"
|
8
|
+
#include "duckdb/parser/constraints/list.hpp"
|
9
|
+
|
10
|
+
namespace duckdb {
|
11
|
+
|
12
|
+
void Constraint::FormatSerialize(FormatSerializer &serializer) const {
|
13
|
+
serializer.WriteProperty("type", type);
|
14
|
+
}
|
15
|
+
|
16
|
+
unique_ptr<Constraint> Constraint::FormatDeserialize(FormatDeserializer &deserializer) {
|
17
|
+
auto type = deserializer.ReadProperty<ConstraintType>("type");
|
18
|
+
unique_ptr<Constraint> result;
|
19
|
+
switch (type) {
|
20
|
+
case ConstraintType::CHECK:
|
21
|
+
result = CheckConstraint::FormatDeserialize(deserializer);
|
22
|
+
break;
|
23
|
+
case ConstraintType::FOREIGN_KEY:
|
24
|
+
result = ForeignKeyConstraint::FormatDeserialize(deserializer);
|
25
|
+
break;
|
26
|
+
case ConstraintType::NOT_NULL:
|
27
|
+
result = NotNullConstraint::FormatDeserialize(deserializer);
|
28
|
+
break;
|
29
|
+
case ConstraintType::UNIQUE:
|
30
|
+
result = UniqueConstraint::FormatDeserialize(deserializer);
|
31
|
+
break;
|
32
|
+
default:
|
33
|
+
throw SerializationException("Unsupported type for deserialization of Constraint!");
|
34
|
+
}
|
35
|
+
return result;
|
36
|
+
}
|
37
|
+
|
38
|
+
void CheckConstraint::FormatSerialize(FormatSerializer &serializer) const {
|
39
|
+
Constraint::FormatSerialize(serializer);
|
40
|
+
serializer.WriteProperty("expression", *expression);
|
41
|
+
}
|
42
|
+
|
43
|
+
unique_ptr<Constraint> CheckConstraint::FormatDeserialize(FormatDeserializer &deserializer) {
|
44
|
+
auto expression = deserializer.ReadProperty<unique_ptr<ParsedExpression>>("expression");
|
45
|
+
auto result = duckdb::unique_ptr<CheckConstraint>(new CheckConstraint(std::move(expression)));
|
46
|
+
return std::move(result);
|
47
|
+
}
|
48
|
+
|
49
|
+
void ForeignKeyConstraint::FormatSerialize(FormatSerializer &serializer) const {
|
50
|
+
Constraint::FormatSerialize(serializer);
|
51
|
+
serializer.WriteProperty("pk_columns", pk_columns);
|
52
|
+
serializer.WriteProperty("fk_columns", fk_columns);
|
53
|
+
serializer.WriteProperty("type", info.type);
|
54
|
+
serializer.WriteProperty("schema", info.schema);
|
55
|
+
serializer.WriteProperty("table", info.table);
|
56
|
+
serializer.WriteProperty("pk_keys", info.pk_keys);
|
57
|
+
serializer.WriteProperty("fk_keys", info.fk_keys);
|
58
|
+
}
|
59
|
+
|
60
|
+
unique_ptr<Constraint> ForeignKeyConstraint::FormatDeserialize(FormatDeserializer &deserializer) {
|
61
|
+
auto result = duckdb::unique_ptr<ForeignKeyConstraint>(new ForeignKeyConstraint());
|
62
|
+
deserializer.ReadProperty("pk_columns", result->pk_columns);
|
63
|
+
deserializer.ReadProperty("fk_columns", result->fk_columns);
|
64
|
+
deserializer.ReadProperty("type", result->info.type);
|
65
|
+
deserializer.ReadProperty("schema", result->info.schema);
|
66
|
+
deserializer.ReadProperty("table", result->info.table);
|
67
|
+
deserializer.ReadProperty("pk_keys", result->info.pk_keys);
|
68
|
+
deserializer.ReadProperty("fk_keys", result->info.fk_keys);
|
69
|
+
return std::move(result);
|
70
|
+
}
|
71
|
+
|
72
|
+
void NotNullConstraint::FormatSerialize(FormatSerializer &serializer) const {
|
73
|
+
Constraint::FormatSerialize(serializer);
|
74
|
+
serializer.WriteProperty("index", index);
|
75
|
+
}
|
76
|
+
|
77
|
+
unique_ptr<Constraint> NotNullConstraint::FormatDeserialize(FormatDeserializer &deserializer) {
|
78
|
+
auto index = deserializer.ReadProperty<LogicalIndex>("index");
|
79
|
+
auto result = duckdb::unique_ptr<NotNullConstraint>(new NotNullConstraint(index));
|
80
|
+
return std::move(result);
|
81
|
+
}
|
82
|
+
|
83
|
+
void UniqueConstraint::FormatSerialize(FormatSerializer &serializer) const {
|
84
|
+
Constraint::FormatSerialize(serializer);
|
85
|
+
serializer.WriteProperty("is_primary_key", is_primary_key);
|
86
|
+
serializer.WriteProperty("index", index);
|
87
|
+
serializer.WriteProperty("columns", columns);
|
88
|
+
}
|
89
|
+
|
90
|
+
unique_ptr<Constraint> UniqueConstraint::FormatDeserialize(FormatDeserializer &deserializer) {
|
91
|
+
auto result = duckdb::unique_ptr<UniqueConstraint>(new UniqueConstraint());
|
92
|
+
deserializer.ReadProperty("is_primary_key", result->is_primary_key);
|
93
|
+
deserializer.ReadProperty("index", result->index);
|
94
|
+
deserializer.ReadProperty("columns", result->columns);
|
95
|
+
return std::move(result);
|
96
|
+
}
|
97
|
+
|
98
|
+
} // namespace duckdb
|
@@ -0,0 +1,188 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// This file is automatically generated by scripts/generate_serialization.py
|
3
|
+
// Do not edit this file manually, your changes will be overwritten
|
4
|
+
//===----------------------------------------------------------------------===//
|
5
|
+
|
6
|
+
#include "duckdb/common/serializer/format_serializer.hpp"
|
7
|
+
#include "duckdb/common/serializer/format_deserializer.hpp"
|
8
|
+
#include "duckdb/parser/parsed_data/create_info.hpp"
|
9
|
+
#include "duckdb/parser/parsed_data/create_index_info.hpp"
|
10
|
+
#include "duckdb/parser/parsed_data/create_table_info.hpp"
|
11
|
+
#include "duckdb/parser/parsed_data/create_schema_info.hpp"
|
12
|
+
#include "duckdb/parser/parsed_data/create_view_info.hpp"
|
13
|
+
#include "duckdb/parser/parsed_data/create_type_info.hpp"
|
14
|
+
#include "duckdb/parser/parsed_data/create_macro_info.hpp"
|
15
|
+
#include "duckdb/parser/parsed_data/create_sequence_info.hpp"
|
16
|
+
|
17
|
+
namespace duckdb {
|
18
|
+
|
19
|
+
void CreateInfo::FormatSerialize(FormatSerializer &serializer) const {
|
20
|
+
serializer.WriteProperty("type", type);
|
21
|
+
serializer.WriteProperty("catalog", catalog);
|
22
|
+
serializer.WriteProperty("schema", schema);
|
23
|
+
serializer.WriteProperty("temporary", temporary);
|
24
|
+
serializer.WriteProperty("internal", internal);
|
25
|
+
serializer.WriteProperty("on_conflict", on_conflict);
|
26
|
+
serializer.WriteProperty("sql", sql);
|
27
|
+
}
|
28
|
+
|
29
|
+
unique_ptr<CreateInfo> CreateInfo::FormatDeserialize(FormatDeserializer &deserializer) {
|
30
|
+
auto type = deserializer.ReadProperty<CatalogType>("type");
|
31
|
+
auto catalog = deserializer.ReadProperty<string>("catalog");
|
32
|
+
auto schema = deserializer.ReadProperty<string>("schema");
|
33
|
+
auto temporary = deserializer.ReadProperty<bool>("temporary");
|
34
|
+
auto internal = deserializer.ReadProperty<bool>("internal");
|
35
|
+
auto on_conflict = deserializer.ReadProperty<OnCreateConflict>("on_conflict");
|
36
|
+
auto sql = deserializer.ReadProperty<string>("sql");
|
37
|
+
unique_ptr<CreateInfo> result;
|
38
|
+
switch (type) {
|
39
|
+
case CatalogType::INDEX_ENTRY:
|
40
|
+
result = CreateIndexInfo::FormatDeserialize(deserializer);
|
41
|
+
break;
|
42
|
+
case CatalogType::MACRO_ENTRY:
|
43
|
+
result = CreateMacroInfo::FormatDeserialize(deserializer);
|
44
|
+
break;
|
45
|
+
case CatalogType::SCHEMA_ENTRY:
|
46
|
+
result = CreateSchemaInfo::FormatDeserialize(deserializer);
|
47
|
+
break;
|
48
|
+
case CatalogType::SEQUENCE_ENTRY:
|
49
|
+
result = CreateSequenceInfo::FormatDeserialize(deserializer);
|
50
|
+
break;
|
51
|
+
case CatalogType::TABLE_ENTRY:
|
52
|
+
result = CreateTableInfo::FormatDeserialize(deserializer);
|
53
|
+
break;
|
54
|
+
case CatalogType::TABLE_MACRO_ENTRY:
|
55
|
+
result = CreateMacroInfo::FormatDeserialize(deserializer);
|
56
|
+
break;
|
57
|
+
case CatalogType::TYPE_ENTRY:
|
58
|
+
result = CreateTypeInfo::FormatDeserialize(deserializer);
|
59
|
+
break;
|
60
|
+
case CatalogType::VIEW_ENTRY:
|
61
|
+
result = CreateViewInfo::FormatDeserialize(deserializer);
|
62
|
+
break;
|
63
|
+
default:
|
64
|
+
throw SerializationException("Unsupported type for deserialization of CreateInfo!");
|
65
|
+
}
|
66
|
+
result->catalog = std::move(catalog);
|
67
|
+
result->schema = std::move(schema);
|
68
|
+
result->temporary = temporary;
|
69
|
+
result->internal = internal;
|
70
|
+
result->on_conflict = on_conflict;
|
71
|
+
result->sql = std::move(sql);
|
72
|
+
return result;
|
73
|
+
}
|
74
|
+
|
75
|
+
void CreateIndexInfo::FormatSerialize(FormatSerializer &serializer) const {
|
76
|
+
CreateInfo::FormatSerialize(serializer);
|
77
|
+
serializer.WriteProperty("name", index_name);
|
78
|
+
serializer.WriteProperty("index_type", index_type);
|
79
|
+
serializer.WriteProperty("constraint_type", constraint_type);
|
80
|
+
serializer.WriteProperty("parsed_expressions", parsed_expressions);
|
81
|
+
serializer.WriteProperty("names", names);
|
82
|
+
serializer.WriteProperty("column_ids", column_ids);
|
83
|
+
}
|
84
|
+
|
85
|
+
unique_ptr<CreateInfo> CreateIndexInfo::FormatDeserialize(FormatDeserializer &deserializer) {
|
86
|
+
auto result = duckdb::unique_ptr<CreateIndexInfo>(new CreateIndexInfo());
|
87
|
+
deserializer.ReadProperty("name", result->index_name);
|
88
|
+
deserializer.ReadProperty("index_type", result->index_type);
|
89
|
+
deserializer.ReadProperty("constraint_type", result->constraint_type);
|
90
|
+
deserializer.ReadProperty("parsed_expressions", result->parsed_expressions);
|
91
|
+
deserializer.ReadProperty("names", result->names);
|
92
|
+
deserializer.ReadProperty("column_ids", result->column_ids);
|
93
|
+
return std::move(result);
|
94
|
+
}
|
95
|
+
|
96
|
+
void CreateMacroInfo::FormatSerialize(FormatSerializer &serializer) const {
|
97
|
+
CreateInfo::FormatSerialize(serializer);
|
98
|
+
serializer.WriteProperty("name", name);
|
99
|
+
serializer.WriteProperty("function", *function);
|
100
|
+
}
|
101
|
+
|
102
|
+
unique_ptr<CreateInfo> CreateMacroInfo::FormatDeserialize(FormatDeserializer &deserializer) {
|
103
|
+
auto result = duckdb::unique_ptr<CreateMacroInfo>(new CreateMacroInfo());
|
104
|
+
deserializer.ReadProperty("name", result->name);
|
105
|
+
deserializer.ReadProperty("function", result->function);
|
106
|
+
return std::move(result);
|
107
|
+
}
|
108
|
+
|
109
|
+
void CreateSchemaInfo::FormatSerialize(FormatSerializer &serializer) const {
|
110
|
+
CreateInfo::FormatSerialize(serializer);
|
111
|
+
}
|
112
|
+
|
113
|
+
unique_ptr<CreateInfo> CreateSchemaInfo::FormatDeserialize(FormatDeserializer &deserializer) {
|
114
|
+
auto result = duckdb::unique_ptr<CreateSchemaInfo>(new CreateSchemaInfo());
|
115
|
+
return std::move(result);
|
116
|
+
}
|
117
|
+
|
118
|
+
void CreateSequenceInfo::FormatSerialize(FormatSerializer &serializer) const {
|
119
|
+
CreateInfo::FormatSerialize(serializer);
|
120
|
+
serializer.WriteProperty("name", name);
|
121
|
+
serializer.WriteProperty("usage_count", usage_count);
|
122
|
+
serializer.WriteProperty("increment", increment);
|
123
|
+
serializer.WriteProperty("min_value", min_value);
|
124
|
+
serializer.WriteProperty("max_value", max_value);
|
125
|
+
serializer.WriteProperty("start_value", start_value);
|
126
|
+
serializer.WriteProperty("cycle", cycle);
|
127
|
+
}
|
128
|
+
|
129
|
+
unique_ptr<CreateInfo> CreateSequenceInfo::FormatDeserialize(FormatDeserializer &deserializer) {
|
130
|
+
auto result = duckdb::unique_ptr<CreateSequenceInfo>(new CreateSequenceInfo());
|
131
|
+
deserializer.ReadProperty("name", result->name);
|
132
|
+
deserializer.ReadProperty("usage_count", result->usage_count);
|
133
|
+
deserializer.ReadProperty("increment", result->increment);
|
134
|
+
deserializer.ReadProperty("min_value", result->min_value);
|
135
|
+
deserializer.ReadProperty("max_value", result->max_value);
|
136
|
+
deserializer.ReadProperty("start_value", result->start_value);
|
137
|
+
deserializer.ReadProperty("cycle", result->cycle);
|
138
|
+
return std::move(result);
|
139
|
+
}
|
140
|
+
|
141
|
+
void CreateTableInfo::FormatSerialize(FormatSerializer &serializer) const {
|
142
|
+
CreateInfo::FormatSerialize(serializer);
|
143
|
+
serializer.WriteProperty("table", table);
|
144
|
+
serializer.WriteProperty("columns", columns);
|
145
|
+
serializer.WriteProperty("constraints", constraints);
|
146
|
+
serializer.WriteOptionalProperty("query", query);
|
147
|
+
}
|
148
|
+
|
149
|
+
unique_ptr<CreateInfo> CreateTableInfo::FormatDeserialize(FormatDeserializer &deserializer) {
|
150
|
+
auto result = duckdb::unique_ptr<CreateTableInfo>(new CreateTableInfo());
|
151
|
+
deserializer.ReadProperty("table", result->table);
|
152
|
+
deserializer.ReadProperty("columns", result->columns);
|
153
|
+
deserializer.ReadProperty("constraints", result->constraints);
|
154
|
+
deserializer.ReadOptionalProperty("query", result->query);
|
155
|
+
return std::move(result);
|
156
|
+
}
|
157
|
+
|
158
|
+
void CreateTypeInfo::FormatSerialize(FormatSerializer &serializer) const {
|
159
|
+
CreateInfo::FormatSerialize(serializer);
|
160
|
+
serializer.WriteProperty("name", name);
|
161
|
+
serializer.WriteProperty("type", type);
|
162
|
+
}
|
163
|
+
|
164
|
+
unique_ptr<CreateInfo> CreateTypeInfo::FormatDeserialize(FormatDeserializer &deserializer) {
|
165
|
+
auto result = duckdb::unique_ptr<CreateTypeInfo>(new CreateTypeInfo());
|
166
|
+
deserializer.ReadProperty("name", result->name);
|
167
|
+
deserializer.ReadProperty("type", result->type);
|
168
|
+
return std::move(result);
|
169
|
+
}
|
170
|
+
|
171
|
+
void CreateViewInfo::FormatSerialize(FormatSerializer &serializer) const {
|
172
|
+
CreateInfo::FormatSerialize(serializer);
|
173
|
+
serializer.WriteProperty("view_name", view_name);
|
174
|
+
serializer.WriteProperty("aliases", aliases);
|
175
|
+
serializer.WriteProperty("types", types);
|
176
|
+
serializer.WriteOptionalProperty("query", query);
|
177
|
+
}
|
178
|
+
|
179
|
+
unique_ptr<CreateInfo> CreateViewInfo::FormatDeserialize(FormatDeserializer &deserializer) {
|
180
|
+
auto result = duckdb::unique_ptr<CreateViewInfo>(new CreateViewInfo());
|
181
|
+
deserializer.ReadProperty("view_name", result->view_name);
|
182
|
+
deserializer.ReadProperty("aliases", result->aliases);
|
183
|
+
deserializer.ReadProperty("types", result->types);
|
184
|
+
deserializer.ReadOptionalProperty("query", result->query);
|
185
|
+
return std::move(result);
|
186
|
+
}
|
187
|
+
|
188
|
+
} // namespace duckdb
|