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.
Files changed (213) hide show
  1. package/configure.py +7 -2
  2. package/package.json +1 -1
  3. package/src/duckdb/src/catalog/catalog.cpp +1 -1
  4. package/src/duckdb/src/catalog/catalog_entry/index_catalog_entry.cpp +17 -41
  5. package/src/duckdb/src/catalog/catalog_entry/macro_catalog_entry.cpp +2 -10
  6. package/src/duckdb/src/catalog/catalog_entry/schema_catalog_entry.cpp +4 -14
  7. package/src/duckdb/src/catalog/catalog_entry/sequence_catalog_entry.cpp +11 -28
  8. package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +11 -38
  9. package/src/duckdb/src/catalog/catalog_entry/view_catalog_entry.cpp +11 -27
  10. package/src/duckdb/src/catalog/catalog_entry.cpp +25 -1
  11. package/src/duckdb/src/common/adbc/adbc.cpp +18 -4
  12. package/src/duckdb/src/common/enum_util.cpp +159 -0
  13. package/src/duckdb/src/common/extra_type_info.cpp +1 -2
  14. package/src/duckdb/src/common/serializer/binary_deserializer.cpp +3 -0
  15. package/src/duckdb/src/common/serializer/binary_serializer.cpp +4 -4
  16. package/src/duckdb/src/common/types/column/column_data_collection.cpp +43 -0
  17. package/src/duckdb/src/common/types/vector.cpp +1 -1
  18. package/src/duckdb/src/common/types.cpp +0 -12
  19. package/src/duckdb/src/execution/physical_plan/plan_comparison_join.cpp +1 -1
  20. package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
  21. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/index_catalog_entry.hpp +1 -2
  22. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/macro_catalog_entry.hpp +1 -4
  23. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/schema_catalog_entry.hpp +2 -5
  24. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/sequence_catalog_entry.hpp +1 -6
  25. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_catalog_entry.hpp +2 -11
  26. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/view_catalog_entry.hpp +2 -5
  27. package/src/duckdb/src/include/duckdb/catalog/catalog_entry.hpp +14 -0
  28. package/src/duckdb/src/include/duckdb/common/assert.hpp +1 -1
  29. package/src/duckdb/src/include/duckdb/common/constants.hpp +2 -0
  30. package/src/duckdb/src/include/duckdb/common/enum_util.hpp +32 -0
  31. package/src/duckdb/src/include/duckdb/common/enums/index_type.hpp +1 -1
  32. package/src/duckdb/src/include/duckdb/common/index_vector.hpp +12 -0
  33. package/src/duckdb/src/include/duckdb/common/serializer/binary_deserializer.hpp +28 -4
  34. package/src/duckdb/src/include/duckdb/common/serializer/binary_serializer.hpp +12 -5
  35. package/src/duckdb/src/include/duckdb/common/serializer/deserialization_data.hpp +110 -0
  36. package/src/duckdb/src/include/duckdb/common/serializer/format_deserializer.hpp +46 -1
  37. package/src/duckdb/src/include/duckdb/common/serializer/format_serializer.hpp +23 -21
  38. package/src/duckdb/src/include/duckdb/common/serializer/serialization_traits.hpp +12 -4
  39. package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp +3 -0
  40. package/src/duckdb/src/include/duckdb/core_functions/scalar/math_functions.hpp +3 -3
  41. package/src/duckdb/src/include/duckdb/function/macro_function.hpp +3 -0
  42. package/src/duckdb/src/include/duckdb/function/scalar_macro_function.hpp +3 -0
  43. package/src/duckdb/src/include/duckdb/function/table_macro_function.hpp +3 -0
  44. package/src/duckdb/src/include/duckdb/parser/column_definition.hpp +6 -5
  45. package/src/duckdb/src/include/duckdb/parser/column_list.hpp +4 -0
  46. package/src/duckdb/src/include/duckdb/parser/constraint.hpp +5 -0
  47. package/src/duckdb/src/include/duckdb/parser/constraints/check_constraint.hpp +3 -0
  48. package/src/duckdb/src/include/duckdb/parser/constraints/foreign_key_constraint.hpp +6 -0
  49. package/src/duckdb/src/include/duckdb/parser/constraints/not_null_constraint.hpp +3 -0
  50. package/src/duckdb/src/include/duckdb/parser/constraints/unique_constraint.hpp +6 -0
  51. package/src/duckdb/src/include/duckdb/parser/expression/between_expression.hpp +1 -1
  52. package/src/duckdb/src/include/duckdb/parser/expression/case_expression.hpp +1 -1
  53. package/src/duckdb/src/include/duckdb/parser/expression/cast_expression.hpp +1 -1
  54. package/src/duckdb/src/include/duckdb/parser/expression/collate_expression.hpp +1 -1
  55. package/src/duckdb/src/include/duckdb/parser/expression/columnref_expression.hpp +1 -1
  56. package/src/duckdb/src/include/duckdb/parser/expression/comparison_expression.hpp +1 -1
  57. package/src/duckdb/src/include/duckdb/parser/expression/conjunction_expression.hpp +1 -1
  58. package/src/duckdb/src/include/duckdb/parser/expression/constant_expression.hpp +1 -1
  59. package/src/duckdb/src/include/duckdb/parser/expression/default_expression.hpp +1 -1
  60. package/src/duckdb/src/include/duckdb/parser/expression/function_expression.hpp +1 -1
  61. package/src/duckdb/src/include/duckdb/parser/expression/lambda_expression.hpp +1 -1
  62. package/src/duckdb/src/include/duckdb/parser/expression/operator_expression.hpp +1 -1
  63. package/src/duckdb/src/include/duckdb/parser/expression/parameter_expression.hpp +1 -1
  64. package/src/duckdb/src/include/duckdb/parser/expression/positional_reference_expression.hpp +1 -1
  65. package/src/duckdb/src/include/duckdb/parser/expression/star_expression.hpp +1 -1
  66. package/src/duckdb/src/include/duckdb/parser/expression/subquery_expression.hpp +1 -1
  67. package/src/duckdb/src/include/duckdb/parser/expression/window_expression.hpp +1 -1
  68. package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_info.hpp +12 -1
  69. package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_table_info.hpp +66 -2
  70. package/src/duckdb/src/include/duckdb/parser/parsed_data/attach_info.hpp +8 -1
  71. package/src/duckdb/src/include/duckdb/parser/parsed_data/copy_info.hpp +8 -1
  72. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_index_info.hpp +4 -1
  73. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_info.hpp +9 -2
  74. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_macro_info.hpp +3 -0
  75. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_schema_info.hpp +3 -0
  76. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_sequence_info.hpp +3 -0
  77. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_table_info.hpp +3 -0
  78. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_type_info.hpp +3 -0
  79. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_view_info.hpp +3 -0
  80. package/src/duckdb/src/include/duckdb/parser/parsed_data/detach_info.hpp +7 -0
  81. package/src/duckdb/src/include/duckdb/parser/parsed_data/drop_info.hpp +7 -0
  82. package/src/duckdb/src/include/duckdb/parser/parsed_data/exported_table_data.hpp +7 -0
  83. package/src/duckdb/src/include/duckdb/parser/parsed_data/load_info.hpp +13 -3
  84. package/src/duckdb/src/include/duckdb/parser/parsed_data/parse_info.hpp +22 -0
  85. package/src/duckdb/src/include/duckdb/parser/parsed_data/pragma_info.hpp +10 -0
  86. package/src/duckdb/src/include/duckdb/parser/parsed_data/show_select_info.hpp +7 -0
  87. package/src/duckdb/src/include/duckdb/parser/parsed_data/transaction_info.hpp +10 -0
  88. package/src/duckdb/src/include/duckdb/parser/parsed_data/vacuum_info.hpp +10 -0
  89. package/src/duckdb/src/include/duckdb/planner/bound_constraint.hpp +0 -8
  90. package/src/duckdb/src/include/duckdb/planner/bound_result_modifier.hpp +6 -0
  91. package/src/duckdb/src/include/duckdb/planner/column_binding.hpp +5 -0
  92. package/src/duckdb/src/include/duckdb/planner/expression/bound_between_expression.hpp +6 -0
  93. package/src/duckdb/src/include/duckdb/planner/expression/bound_case_expression.hpp +6 -0
  94. package/src/duckdb/src/include/duckdb/planner/expression/bound_cast_expression.hpp +6 -0
  95. package/src/duckdb/src/include/duckdb/planner/expression/bound_columnref_expression.hpp +3 -0
  96. package/src/duckdb/src/include/duckdb/planner/expression/bound_comparison_expression.hpp +3 -0
  97. package/src/duckdb/src/include/duckdb/planner/expression/bound_conjunction_expression.hpp +3 -0
  98. package/src/duckdb/src/include/duckdb/planner/expression/bound_constant_expression.hpp +3 -0
  99. package/src/duckdb/src/include/duckdb/planner/expression/bound_default_expression.hpp +3 -0
  100. package/src/duckdb/src/include/duckdb/planner/expression/bound_lambda_expression.hpp +3 -1
  101. package/src/duckdb/src/include/duckdb/planner/expression/bound_lambdaref_expression.hpp +3 -0
  102. package/src/duckdb/src/include/duckdb/planner/expression/bound_operator_expression.hpp +3 -0
  103. package/src/duckdb/src/include/duckdb/planner/expression/bound_parameter_data.hpp +5 -2
  104. package/src/duckdb/src/include/duckdb/planner/expression/bound_parameter_expression.hpp +7 -0
  105. package/src/duckdb/src/include/duckdb/planner/expression/bound_reference_expression.hpp +3 -0
  106. package/src/duckdb/src/include/duckdb/planner/expression/bound_unnest_expression.hpp +3 -0
  107. package/src/duckdb/src/include/duckdb/planner/expression/list.hpp +1 -0
  108. package/src/duckdb/src/include/duckdb/planner/expression.hpp +3 -0
  109. package/src/duckdb/src/include/duckdb/planner/joinside.hpp +3 -0
  110. package/src/duckdb/src/include/duckdb/planner/logical_operator.hpp +3 -0
  111. package/src/duckdb/src/include/duckdb/planner/operator/logical_aggregate.hpp +3 -0
  112. package/src/duckdb/src/include/duckdb/planner/operator/logical_any_join.hpp +3 -0
  113. package/src/duckdb/src/include/duckdb/planner/operator/logical_column_data_get.hpp +4 -0
  114. package/src/duckdb/src/include/duckdb/planner/operator/logical_comparison_join.hpp +9 -2
  115. package/src/duckdb/src/include/duckdb/planner/operator/logical_create.hpp +9 -6
  116. package/src/duckdb/src/include/duckdb/planner/operator/logical_create_index.hpp +2 -16
  117. package/src/duckdb/src/include/duckdb/planner/operator/logical_create_table.hpp +10 -6
  118. package/src/duckdb/src/include/duckdb/planner/operator/logical_cross_product.hpp +3 -0
  119. package/src/duckdb/src/include/duckdb/planner/operator/logical_cteref.hpp +2 -0
  120. package/src/duckdb/src/include/duckdb/planner/operator/logical_delete.hpp +7 -0
  121. package/src/duckdb/src/include/duckdb/planner/operator/logical_delim_get.hpp +3 -0
  122. package/src/duckdb/src/include/duckdb/planner/operator/logical_distinct.hpp +6 -10
  123. package/src/duckdb/src/include/duckdb/planner/operator/logical_dummy_scan.hpp +2 -0
  124. package/src/duckdb/src/include/duckdb/planner/operator/logical_empty_result.hpp +2 -0
  125. package/src/duckdb/src/include/duckdb/planner/operator/logical_explain.hpp +4 -0
  126. package/src/duckdb/src/include/duckdb/planner/operator/logical_expression_get.hpp +3 -0
  127. package/src/duckdb/src/include/duckdb/planner/operator/logical_filter.hpp +3 -0
  128. package/src/duckdb/src/include/duckdb/planner/operator/logical_insert.hpp +6 -0
  129. package/src/duckdb/src/include/duckdb/planner/operator/logical_limit.hpp +3 -0
  130. package/src/duckdb/src/include/duckdb/planner/operator/logical_limit_percent.hpp +3 -0
  131. package/src/duckdb/src/include/duckdb/planner/operator/logical_materialized_cte.hpp +5 -2
  132. package/src/duckdb/src/include/duckdb/planner/operator/logical_order.hpp +7 -35
  133. package/src/duckdb/src/include/duckdb/planner/operator/logical_pivot.hpp +6 -0
  134. package/src/duckdb/src/include/duckdb/planner/operator/logical_positional_join.hpp +3 -0
  135. package/src/duckdb/src/include/duckdb/planner/operator/logical_projection.hpp +3 -0
  136. package/src/duckdb/src/include/duckdb/planner/operator/logical_recursive_cte.hpp +5 -3
  137. package/src/duckdb/src/include/duckdb/planner/operator/logical_reset.hpp +4 -0
  138. package/src/duckdb/src/include/duckdb/planner/operator/logical_sample.hpp +6 -0
  139. package/src/duckdb/src/include/duckdb/planner/operator/logical_set.hpp +4 -0
  140. package/src/duckdb/src/include/duckdb/planner/operator/logical_set_operation.hpp +4 -0
  141. package/src/duckdb/src/include/duckdb/planner/operator/logical_show.hpp +3 -0
  142. package/src/duckdb/src/include/duckdb/planner/operator/logical_simple.hpp +3 -0
  143. package/src/duckdb/src/include/duckdb/planner/operator/logical_top_n.hpp +4 -0
  144. package/src/duckdb/src/include/duckdb/planner/operator/logical_unnest.hpp +2 -0
  145. package/src/duckdb/src/include/duckdb/planner/operator/logical_update.hpp +6 -0
  146. package/src/duckdb/src/include/duckdb/planner/operator/logical_window.hpp +3 -0
  147. package/src/duckdb/src/include/duckdb/planner/tableref/bound_pivotref.hpp +3 -0
  148. package/src/duckdb/src/optimizer/deliminator.cpp +5 -3
  149. package/src/duckdb/src/parser/column_definition.cpp +20 -32
  150. package/src/duckdb/src/parser/column_list.cpp +8 -0
  151. package/src/duckdb/src/parser/constraints/foreign_key_constraint.cpp +3 -0
  152. package/src/duckdb/src/parser/constraints/unique_constraint.cpp +3 -0
  153. package/src/duckdb/src/parser/expression/case_expression.cpp +0 -12
  154. package/src/duckdb/src/parser/parsed_data/alter_info.cpp +5 -2
  155. package/src/duckdb/src/parser/parsed_data/alter_table_info.cpp +38 -0
  156. package/src/duckdb/src/parser/parsed_data/create_index_info.cpp +3 -1
  157. package/src/duckdb/src/parser/parsed_data/create_sequence_info.cpp +2 -0
  158. package/src/duckdb/src/parser/parsed_data/detach_info.cpp +1 -1
  159. package/src/duckdb/src/parser/parsed_data/drop_info.cpp +1 -1
  160. package/src/duckdb/src/parser/parsed_data/sample_options.cpp +0 -18
  161. package/src/duckdb/src/parser/parsed_data/transaction_info.cpp +4 -1
  162. package/src/duckdb/src/parser/parsed_data/vacuum_info.cpp +1 -1
  163. package/src/duckdb/src/parser/query_node.cpp +0 -10
  164. package/src/duckdb/src/parser/result_modifier.cpp +0 -13
  165. package/src/duckdb/src/parser/statement/select_statement.cpp +0 -10
  166. package/src/duckdb/src/parser/tableref/pivotref.cpp +0 -16
  167. package/src/duckdb/src/parser/transform/statement/transform_create_index.cpp +5 -4
  168. package/src/duckdb/src/planner/binder/query_node/plan_subquery.cpp +1 -1
  169. package/src/duckdb/src/planner/binder/statement/bind_create.cpp +6 -1
  170. package/src/duckdb/src/planner/expression/bound_between_expression.cpp +4 -0
  171. package/src/duckdb/src/planner/expression/bound_cast_expression.cpp +13 -6
  172. package/src/duckdb/src/planner/expression/bound_parameter_expression.cpp +20 -12
  173. package/src/duckdb/src/planner/expression/bound_window_expression.cpp +1 -4
  174. package/src/duckdb/src/planner/logical_operator.cpp +13 -1
  175. package/src/duckdb/src/planner/operator/logical_comparison_join.cpp +16 -2
  176. package/src/duckdb/src/planner/operator/logical_create.cpp +14 -0
  177. package/src/duckdb/src/planner/operator/logical_create_index.cpp +20 -0
  178. package/src/duckdb/src/planner/operator/logical_create_table.cpp +16 -0
  179. package/src/duckdb/src/planner/operator/logical_delete.cpp +9 -2
  180. package/src/duckdb/src/planner/operator/logical_delim_join.cpp +2 -4
  181. package/src/duckdb/src/planner/operator/logical_distinct.cpp +13 -0
  182. package/src/duckdb/src/planner/operator/logical_explain.cpp +1 -1
  183. package/src/duckdb/src/planner/operator/logical_insert.cpp +8 -2
  184. package/src/duckdb/src/planner/operator/logical_materialized_cte.cpp +3 -2
  185. package/src/duckdb/src/planner/operator/logical_order.cpp +39 -0
  186. package/src/duckdb/src/planner/operator/logical_pivot.cpp +3 -0
  187. package/src/duckdb/src/planner/operator/logical_recursive_cte.cpp +5 -5
  188. package/src/duckdb/src/planner/operator/logical_sample.cpp +3 -0
  189. package/src/duckdb/src/planner/operator/logical_update.cpp +8 -2
  190. package/src/duckdb/src/planner/parsed_data/bound_create_table_info.cpp +4 -2
  191. package/src/duckdb/src/planner/planner.cpp +11 -0
  192. package/src/duckdb/src/storage/checkpoint_manager.cpp +23 -23
  193. package/src/duckdb/src/storage/serialization/serialize_constraint.cpp +98 -0
  194. package/src/duckdb/src/storage/serialization/serialize_create_info.cpp +188 -0
  195. package/src/duckdb/src/storage/serialization/serialize_expression.cpp +274 -0
  196. package/src/duckdb/src/storage/serialization/serialize_logical_operator.cpp +729 -0
  197. package/src/duckdb/src/storage/serialization/serialize_macro_function.cpp +62 -0
  198. package/src/duckdb/src/storage/serialization/serialize_nodes.cpp +242 -0
  199. package/src/duckdb/src/storage/serialization/serialize_parse_info.cpp +419 -0
  200. package/src/duckdb/src/storage/serialization/serialize_parsed_expression.cpp +40 -38
  201. package/src/duckdb/src/storage/serialization/serialize_query_node.cpp +36 -36
  202. package/src/duckdb/src/storage/serialization/serialize_result_modifier.cpp +25 -14
  203. package/src/duckdb/src/storage/serialization/serialize_statement.cpp +22 -0
  204. package/src/duckdb/src/storage/serialization/serialize_tableref.cpp +47 -47
  205. package/src/duckdb/src/storage/serialization/serialize_types.cpp +25 -25
  206. package/src/duckdb/src/storage/storage_info.cpp +3 -2
  207. package/src/duckdb/src/storage/wal_replay.cpp +20 -19
  208. package/src/duckdb/third_party/concurrentqueue/lightweightsemaphore.h +3 -76
  209. package/src/duckdb/third_party/libpg_query/pg_functions.cpp +13 -0
  210. package/src/duckdb/third_party/libpg_query/src_backend_parser_scansup.cpp +9 -0
  211. package/src/duckdb/ub_src_parser.cpp +0 -2
  212. package/src/duckdb/ub_src_storage_serialization.cpp +16 -0
  213. package/src/duckdb/src/parser/common_table_expression_info.cpp +0 -21
@@ -0,0 +1,274 @@
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/planner/expression/list.hpp"
9
+
10
+ namespace duckdb {
11
+
12
+ void Expression::FormatSerialize(FormatSerializer &serializer) const {
13
+ serializer.WriteProperty("expression_class", expression_class);
14
+ serializer.WriteProperty("type", type);
15
+ serializer.WriteProperty("alias", alias);
16
+ }
17
+
18
+ unique_ptr<Expression> Expression::FormatDeserialize(FormatDeserializer &deserializer) {
19
+ auto expression_class = deserializer.ReadProperty<ExpressionClass>("expression_class");
20
+ auto type = deserializer.ReadProperty<ExpressionType>("type");
21
+ auto alias = deserializer.ReadProperty<string>("alias");
22
+ deserializer.Set<ExpressionType>(type);
23
+ unique_ptr<Expression> result;
24
+ switch (expression_class) {
25
+ case ExpressionClass::BOUND_BETWEEN:
26
+ result = BoundBetweenExpression::FormatDeserialize(deserializer);
27
+ break;
28
+ case ExpressionClass::BOUND_CASE:
29
+ result = BoundCaseExpression::FormatDeserialize(deserializer);
30
+ break;
31
+ case ExpressionClass::BOUND_CAST:
32
+ result = BoundCastExpression::FormatDeserialize(deserializer);
33
+ break;
34
+ case ExpressionClass::BOUND_COLUMN_REF:
35
+ result = BoundColumnRefExpression::FormatDeserialize(deserializer);
36
+ break;
37
+ case ExpressionClass::BOUND_COMPARISON:
38
+ result = BoundComparisonExpression::FormatDeserialize(deserializer);
39
+ break;
40
+ case ExpressionClass::BOUND_CONJUNCTION:
41
+ result = BoundConjunctionExpression::FormatDeserialize(deserializer);
42
+ break;
43
+ case ExpressionClass::BOUND_CONSTANT:
44
+ result = BoundConstantExpression::FormatDeserialize(deserializer);
45
+ break;
46
+ case ExpressionClass::BOUND_DEFAULT:
47
+ result = BoundDefaultExpression::FormatDeserialize(deserializer);
48
+ break;
49
+ case ExpressionClass::BOUND_LAMBDA:
50
+ result = BoundLambdaExpression::FormatDeserialize(deserializer);
51
+ break;
52
+ case ExpressionClass::BOUND_LAMBDA_REF:
53
+ result = BoundLambdaRefExpression::FormatDeserialize(deserializer);
54
+ break;
55
+ case ExpressionClass::BOUND_OPERATOR:
56
+ result = BoundOperatorExpression::FormatDeserialize(deserializer);
57
+ break;
58
+ case ExpressionClass::BOUND_PARAMETER:
59
+ result = BoundParameterExpression::FormatDeserialize(deserializer);
60
+ break;
61
+ case ExpressionClass::BOUND_REF:
62
+ result = BoundReferenceExpression::FormatDeserialize(deserializer);
63
+ break;
64
+ case ExpressionClass::BOUND_UNNEST:
65
+ result = BoundUnnestExpression::FormatDeserialize(deserializer);
66
+ break;
67
+ default:
68
+ throw SerializationException("Unsupported type for deserialization of Expression!");
69
+ }
70
+ deserializer.Unset<ExpressionType>();
71
+ result->alias = std::move(alias);
72
+ return result;
73
+ }
74
+
75
+ void BoundBetweenExpression::FormatSerialize(FormatSerializer &serializer) const {
76
+ Expression::FormatSerialize(serializer);
77
+ serializer.WriteProperty("input", *input);
78
+ serializer.WriteProperty("lower", *lower);
79
+ serializer.WriteProperty("upper", *upper);
80
+ serializer.WriteProperty("lower_inclusive", lower_inclusive);
81
+ serializer.WriteProperty("upper_inclusive", upper_inclusive);
82
+ }
83
+
84
+ unique_ptr<Expression> BoundBetweenExpression::FormatDeserialize(FormatDeserializer &deserializer) {
85
+ auto result = duckdb::unique_ptr<BoundBetweenExpression>(new BoundBetweenExpression());
86
+ deserializer.ReadProperty("input", result->input);
87
+ deserializer.ReadProperty("lower", result->lower);
88
+ deserializer.ReadProperty("upper", result->upper);
89
+ deserializer.ReadProperty("lower_inclusive", result->lower_inclusive);
90
+ deserializer.ReadProperty("upper_inclusive", result->upper_inclusive);
91
+ return std::move(result);
92
+ }
93
+
94
+ void BoundCaseExpression::FormatSerialize(FormatSerializer &serializer) const {
95
+ Expression::FormatSerialize(serializer);
96
+ serializer.WriteProperty("return_type", return_type);
97
+ serializer.WriteProperty("case_checks", case_checks);
98
+ serializer.WriteProperty("else_expr", *else_expr);
99
+ }
100
+
101
+ unique_ptr<Expression> BoundCaseExpression::FormatDeserialize(FormatDeserializer &deserializer) {
102
+ auto return_type = deserializer.ReadProperty<LogicalType>("return_type");
103
+ auto result = duckdb::unique_ptr<BoundCaseExpression>(new BoundCaseExpression(std::move(return_type)));
104
+ deserializer.ReadProperty("case_checks", result->case_checks);
105
+ deserializer.ReadProperty("else_expr", result->else_expr);
106
+ return std::move(result);
107
+ }
108
+
109
+ void BoundCastExpression::FormatSerialize(FormatSerializer &serializer) const {
110
+ Expression::FormatSerialize(serializer);
111
+ serializer.WriteProperty("child", *child);
112
+ serializer.WriteProperty("return_type", return_type);
113
+ serializer.WriteProperty("try_cast", try_cast);
114
+ }
115
+
116
+ unique_ptr<Expression> BoundCastExpression::FormatDeserialize(FormatDeserializer &deserializer) {
117
+ auto child = deserializer.ReadProperty<unique_ptr<Expression>>("child");
118
+ auto return_type = deserializer.ReadProperty<LogicalType>("return_type");
119
+ auto result = duckdb::unique_ptr<BoundCastExpression>(new BoundCastExpression(deserializer.Get<ClientContext &>(), std::move(child), std::move(return_type)));
120
+ deserializer.ReadProperty("try_cast", result->try_cast);
121
+ return std::move(result);
122
+ }
123
+
124
+ void BoundColumnRefExpression::FormatSerialize(FormatSerializer &serializer) const {
125
+ Expression::FormatSerialize(serializer);
126
+ serializer.WriteProperty("return_type", return_type);
127
+ serializer.WriteProperty("binding", binding);
128
+ serializer.WriteProperty("depth", depth);
129
+ }
130
+
131
+ unique_ptr<Expression> BoundColumnRefExpression::FormatDeserialize(FormatDeserializer &deserializer) {
132
+ auto return_type = deserializer.ReadProperty<LogicalType>("return_type");
133
+ auto binding = deserializer.ReadProperty<ColumnBinding>("binding");
134
+ auto depth = deserializer.ReadProperty<idx_t>("depth");
135
+ auto result = duckdb::unique_ptr<BoundColumnRefExpression>(new BoundColumnRefExpression(std::move(return_type), binding, depth));
136
+ return std::move(result);
137
+ }
138
+
139
+ void BoundComparisonExpression::FormatSerialize(FormatSerializer &serializer) const {
140
+ Expression::FormatSerialize(serializer);
141
+ serializer.WriteProperty("left", *left);
142
+ serializer.WriteProperty("right", *right);
143
+ }
144
+
145
+ unique_ptr<Expression> BoundComparisonExpression::FormatDeserialize(FormatDeserializer &deserializer) {
146
+ auto left = deserializer.ReadProperty<unique_ptr<Expression>>("left");
147
+ auto right = deserializer.ReadProperty<unique_ptr<Expression>>("right");
148
+ auto result = duckdb::unique_ptr<BoundComparisonExpression>(new BoundComparisonExpression(deserializer.Get<ExpressionType>(), std::move(left), std::move(right)));
149
+ return std::move(result);
150
+ }
151
+
152
+ void BoundConjunctionExpression::FormatSerialize(FormatSerializer &serializer) const {
153
+ Expression::FormatSerialize(serializer);
154
+ serializer.WriteProperty("children", children);
155
+ }
156
+
157
+ unique_ptr<Expression> BoundConjunctionExpression::FormatDeserialize(FormatDeserializer &deserializer) {
158
+ auto result = duckdb::unique_ptr<BoundConjunctionExpression>(new BoundConjunctionExpression(deserializer.Get<ExpressionType>()));
159
+ deserializer.ReadProperty("children", result->children);
160
+ return std::move(result);
161
+ }
162
+
163
+ void BoundConstantExpression::FormatSerialize(FormatSerializer &serializer) const {
164
+ Expression::FormatSerialize(serializer);
165
+ serializer.WriteProperty("value", value);
166
+ }
167
+
168
+ unique_ptr<Expression> BoundConstantExpression::FormatDeserialize(FormatDeserializer &deserializer) {
169
+ auto value = deserializer.ReadProperty<Value>("value");
170
+ auto result = duckdb::unique_ptr<BoundConstantExpression>(new BoundConstantExpression(value));
171
+ return std::move(result);
172
+ }
173
+
174
+ void BoundDefaultExpression::FormatSerialize(FormatSerializer &serializer) const {
175
+ Expression::FormatSerialize(serializer);
176
+ serializer.WriteProperty("return_type", return_type);
177
+ }
178
+
179
+ unique_ptr<Expression> BoundDefaultExpression::FormatDeserialize(FormatDeserializer &deserializer) {
180
+ auto return_type = deserializer.ReadProperty<LogicalType>("return_type");
181
+ auto result = duckdb::unique_ptr<BoundDefaultExpression>(new BoundDefaultExpression(std::move(return_type)));
182
+ return std::move(result);
183
+ }
184
+
185
+ void BoundLambdaExpression::FormatSerialize(FormatSerializer &serializer) const {
186
+ Expression::FormatSerialize(serializer);
187
+ serializer.WriteProperty("return_type", return_type);
188
+ serializer.WriteProperty("lambda_expr", *lambda_expr);
189
+ serializer.WriteProperty("captures", captures);
190
+ serializer.WriteProperty("parameter_count", parameter_count);
191
+ }
192
+
193
+ unique_ptr<Expression> BoundLambdaExpression::FormatDeserialize(FormatDeserializer &deserializer) {
194
+ auto return_type = deserializer.ReadProperty<LogicalType>("return_type");
195
+ auto lambda_expr = deserializer.ReadProperty<unique_ptr<Expression>>("lambda_expr");
196
+ auto captures = deserializer.ReadProperty<vector<unique_ptr<Expression>>>("captures");
197
+ auto parameter_count = deserializer.ReadProperty<idx_t>("parameter_count");
198
+ auto result = duckdb::unique_ptr<BoundLambdaExpression>(new BoundLambdaExpression(deserializer.Get<ExpressionType>(), std::move(return_type), std::move(lambda_expr), parameter_count));
199
+ result->captures = std::move(captures);
200
+ return std::move(result);
201
+ }
202
+
203
+ void BoundLambdaRefExpression::FormatSerialize(FormatSerializer &serializer) const {
204
+ Expression::FormatSerialize(serializer);
205
+ serializer.WriteProperty("return_type", return_type);
206
+ serializer.WriteProperty("binding", binding);
207
+ serializer.WriteProperty("lambda_index", lambda_index);
208
+ serializer.WriteProperty("depth", depth);
209
+ }
210
+
211
+ unique_ptr<Expression> BoundLambdaRefExpression::FormatDeserialize(FormatDeserializer &deserializer) {
212
+ auto return_type = deserializer.ReadProperty<LogicalType>("return_type");
213
+ auto binding = deserializer.ReadProperty<ColumnBinding>("binding");
214
+ auto lambda_index = deserializer.ReadProperty<idx_t>("lambda_index");
215
+ auto depth = deserializer.ReadProperty<idx_t>("depth");
216
+ auto result = duckdb::unique_ptr<BoundLambdaRefExpression>(new BoundLambdaRefExpression(std::move(return_type), binding, lambda_index, depth));
217
+ return std::move(result);
218
+ }
219
+
220
+ void BoundOperatorExpression::FormatSerialize(FormatSerializer &serializer) const {
221
+ Expression::FormatSerialize(serializer);
222
+ serializer.WriteProperty("return_type", return_type);
223
+ serializer.WriteProperty("children", children);
224
+ }
225
+
226
+ unique_ptr<Expression> BoundOperatorExpression::FormatDeserialize(FormatDeserializer &deserializer) {
227
+ auto return_type = deserializer.ReadProperty<LogicalType>("return_type");
228
+ auto result = duckdb::unique_ptr<BoundOperatorExpression>(new BoundOperatorExpression(deserializer.Get<ExpressionType>(), std::move(return_type)));
229
+ deserializer.ReadProperty("children", result->children);
230
+ return std::move(result);
231
+ }
232
+
233
+ void BoundParameterExpression::FormatSerialize(FormatSerializer &serializer) const {
234
+ Expression::FormatSerialize(serializer);
235
+ serializer.WriteProperty("parameter_nr", parameter_nr);
236
+ serializer.WriteProperty("return_type", return_type);
237
+ serializer.WriteProperty("parameter_data", *parameter_data);
238
+ }
239
+
240
+ unique_ptr<Expression> BoundParameterExpression::FormatDeserialize(FormatDeserializer &deserializer) {
241
+ auto parameter_nr = deserializer.ReadProperty<idx_t>("parameter_nr");
242
+ auto return_type = deserializer.ReadProperty<LogicalType>("return_type");
243
+ auto parameter_data = deserializer.ReadProperty<shared_ptr<BoundParameterData>>("parameter_data");
244
+ auto result = duckdb::unique_ptr<BoundParameterExpression>(new BoundParameterExpression(deserializer.Get<bound_parameter_map_t &>(), parameter_nr, std::move(return_type), std::move(parameter_data)));
245
+ return std::move(result);
246
+ }
247
+
248
+ void BoundReferenceExpression::FormatSerialize(FormatSerializer &serializer) const {
249
+ Expression::FormatSerialize(serializer);
250
+ serializer.WriteProperty("return_type", return_type);
251
+ serializer.WriteProperty("index", index);
252
+ }
253
+
254
+ unique_ptr<Expression> BoundReferenceExpression::FormatDeserialize(FormatDeserializer &deserializer) {
255
+ auto return_type = deserializer.ReadProperty<LogicalType>("return_type");
256
+ auto index = deserializer.ReadProperty<idx_t>("index");
257
+ auto result = duckdb::unique_ptr<BoundReferenceExpression>(new BoundReferenceExpression(std::move(return_type), index));
258
+ return std::move(result);
259
+ }
260
+
261
+ void BoundUnnestExpression::FormatSerialize(FormatSerializer &serializer) const {
262
+ Expression::FormatSerialize(serializer);
263
+ serializer.WriteProperty("return_type", return_type);
264
+ serializer.WriteProperty("child", *child);
265
+ }
266
+
267
+ unique_ptr<Expression> BoundUnnestExpression::FormatDeserialize(FormatDeserializer &deserializer) {
268
+ auto return_type = deserializer.ReadProperty<LogicalType>("return_type");
269
+ auto result = duckdb::unique_ptr<BoundUnnestExpression>(new BoundUnnestExpression(std::move(return_type)));
270
+ deserializer.ReadProperty("child", result->child);
271
+ return std::move(result);
272
+ }
273
+
274
+ } // namespace duckdb