duckdb 0.8.2-dev1862.0 → 0.8.2-dev2044.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/binding.gyp +9 -9
- 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/enum_util.cpp +187 -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/hugeint.cpp +40 -0
- package/src/duckdb/src/common/types/vector.cpp +1 -1
- package/src/duckdb/src/common/types.cpp +0 -12
- package/src/duckdb/src/core_functions/function_list.cpp +1 -0
- package/src/duckdb/src/core_functions/scalar/string/to_base.cpp +66 -0
- package/src/duckdb/src/execution/operator/aggregate/physical_hash_aggregate.cpp +14 -11
- package/src/duckdb/src/execution/operator/aggregate/physical_perfecthash_aggregate.cpp +6 -4
- package/src/duckdb/src/execution/operator/aggregate/physical_ungrouped_aggregate.cpp +14 -12
- package/src/duckdb/src/execution/operator/aggregate/physical_window.cpp +6 -4
- package/src/duckdb/src/execution/operator/helper/physical_batch_collector.cpp +8 -6
- package/src/duckdb/src/execution/operator/helper/physical_explain_analyze.cpp +2 -2
- package/src/duckdb/src/execution/operator/helper/physical_limit.cpp +5 -3
- package/src/duckdb/src/execution/operator/helper/physical_materialized_collector.cpp +7 -5
- package/src/duckdb/src/execution/operator/helper/physical_vacuum.cpp +7 -5
- package/src/duckdb/src/execution/operator/join/physical_asof_join.cpp +5 -4
- package/src/duckdb/src/execution/operator/join/physical_blockwise_nl_join.cpp +2 -2
- package/src/duckdb/src/execution/operator/join/physical_delim_join.cpp +13 -6
- package/src/duckdb/src/execution/operator/join/physical_hash_join.cpp +7 -5
- package/src/duckdb/src/execution/operator/join/physical_iejoin.cpp +7 -5
- package/src/duckdb/src/execution/operator/join/physical_nested_loop_join.cpp +7 -4
- package/src/duckdb/src/execution/operator/join/physical_piecewise_merge_join.cpp +8 -6
- package/src/duckdb/src/execution/operator/order/physical_order.cpp +7 -5
- package/src/duckdb/src/execution/operator/order/physical_top_n.cpp +7 -5
- package/src/duckdb/src/execution/operator/persistent/physical_batch_copy_to_file.cpp +8 -6
- package/src/duckdb/src/execution/operator/persistent/physical_batch_insert.cpp +8 -7
- package/src/duckdb/src/execution/operator/persistent/physical_copy_to_file.cpp +8 -6
- package/src/duckdb/src/execution/operator/persistent/physical_fixed_batch_copy.cpp +11 -9
- package/src/duckdb/src/execution/operator/persistent/physical_insert.cpp +10 -10
- package/src/duckdb/src/execution/operator/persistent/physical_update.cpp +4 -2
- package/src/duckdb/src/execution/operator/schema/physical_create_index.cpp +7 -6
- package/src/duckdb/src/execution/physical_operator.cpp +3 -2
- 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/bitpacking.hpp +70 -55
- package/src/duckdb/src/include/duckdb/common/constants.hpp +2 -0
- package/src/duckdb/src/include/duckdb/common/enum_util.hpp +40 -0
- package/src/duckdb/src/include/duckdb/common/enums/index_type.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/enums/operator_result_type.hpp +5 -1
- package/src/duckdb/src/include/duckdb/common/hugeint.hpp +15 -0
- package/src/duckdb/src/include/duckdb/common/index_vector.hpp +12 -0
- package/src/duckdb/src/include/duckdb/common/limits.hpp +52 -149
- package/src/duckdb/src/include/duckdb/common/numeric_utils.hpp +48 -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/aggregate/distributive_functions.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/operators_functions.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/string_functions.hpp +9 -0
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_hash_aggregate.hpp +3 -3
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_perfecthash_aggregate.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_ungrouped_aggregate.hpp +3 -3
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_window.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_batch_collector.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_explain_analyze.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_limit.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_materialized_collector.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_vacuum.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_asof_join.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_blockwise_nl_join.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_delim_join.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_hash_join.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_iejoin.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_nested_loop_join.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_piecewise_merge_join.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/order/physical_order.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/order/physical_top_n.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_batch_copy_to_file.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_batch_insert.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_copy_to_file.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_fixed_batch_copy.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_insert.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_update.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_index.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/physical_operator.hpp +3 -3
- package/src/duckdb/src/include/duckdb/execution/physical_operator_states.hpp +11 -0
- 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/main/extension_entries.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parallel/pipeline.hpp +0 -3
- package/src/duckdb/src/include/duckdb/parallel/pipeline_executor.hpp +3 -2
- 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/main/relation/join_relation.cpp +1 -1
- package/src/duckdb/src/optimizer/deliminator.cpp +5 -3
- package/src/duckdb/src/parallel/pipeline.cpp +0 -17
- package/src/duckdb/src/parallel/pipeline_executor.cpp +26 -7
- package/src/duckdb/src/parallel/pipeline_finish_event.cpp +55 -1
- 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/binder/tableref/bind_basetableref.cpp +13 -3
- 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/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/compression/bitpacking.cpp +87 -63
- package/src/duckdb/src/storage/compression/bitpacking_hugeint.cpp +295 -0
- 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/ub_extension_icu_third_party_icu_i18n.cpp +6 -6
- package/src/duckdb/ub_src_core_functions_scalar_string.cpp +2 -0
- package/src/duckdb/ub_src_parser.cpp +0 -2
- package/src/duckdb/ub_src_storage_compression.cpp +2 -0
- package/src/duckdb/ub_src_storage_serialization.cpp +16 -0
- package/src/duckdb/src/parser/common_table_expression_info.cpp +0 -21
package/binding.gyp
CHANGED
@@ -241,18 +241,18 @@
|
|
241
241
|
"src/duckdb/third_party/zstd/compress/zstd_lazy.cpp",
|
242
242
|
"src/duckdb/third_party/zstd/compress/zstd_ldm.cpp",
|
243
243
|
"src/duckdb/third_party/zstd/compress/zstd_opt.cpp",
|
244
|
-
"src/duckdb/extension/icu/./icu-list-range.cpp",
|
245
|
-
"src/duckdb/extension/icu/./icu-table-range.cpp",
|
246
|
-
"src/duckdb/extension/icu/./icu-datesub.cpp",
|
247
|
-
"src/duckdb/extension/icu/./icu-dateadd.cpp",
|
248
|
-
"src/duckdb/extension/icu/./icu-timebucket.cpp",
|
249
|
-
"src/duckdb/extension/icu/./icu-makedate.cpp",
|
250
|
-
"src/duckdb/extension/icu/./icu-timezone.cpp",
|
251
|
-
"src/duckdb/extension/icu/./icu-datefunc.cpp",
|
252
|
-
"src/duckdb/extension/icu/./icu-datepart.cpp",
|
253
244
|
"src/duckdb/extension/icu/./icu_extension.cpp",
|
254
245
|
"src/duckdb/extension/icu/./icu-datetrunc.cpp",
|
246
|
+
"src/duckdb/extension/icu/./icu-datepart.cpp",
|
255
247
|
"src/duckdb/extension/icu/./icu-strptime.cpp",
|
248
|
+
"src/duckdb/extension/icu/./icu-table-range.cpp",
|
249
|
+
"src/duckdb/extension/icu/./icu-makedate.cpp",
|
250
|
+
"src/duckdb/extension/icu/./icu-datefunc.cpp",
|
251
|
+
"src/duckdb/extension/icu/./icu-list-range.cpp",
|
252
|
+
"src/duckdb/extension/icu/./icu-timebucket.cpp",
|
253
|
+
"src/duckdb/extension/icu/./icu-dateadd.cpp",
|
254
|
+
"src/duckdb/extension/icu/./icu-timezone.cpp",
|
255
|
+
"src/duckdb/extension/icu/./icu-datesub.cpp",
|
256
256
|
"src/duckdb/ub_extension_icu_third_party_icu_common.cpp",
|
257
257
|
"src/duckdb/ub_extension_icu_third_party_icu_i18n.cpp",
|
258
258
|
"src/duckdb/extension/icu/third_party/icu/stubdata/stubdata.cpp",
|
package/package.json
CHANGED
@@ -278,7 +278,7 @@ optional_ptr<CatalogEntry> Catalog::CreateIndex(CatalogTransaction transaction,
|
|
278
278
|
|
279
279
|
optional_ptr<CatalogEntry> Catalog::CreateIndex(ClientContext &context, CreateIndexInfo &info) {
|
280
280
|
auto &schema = GetSchema(context, info.schema);
|
281
|
-
auto &table = GetEntry<TableCatalogEntry>(context, schema.name, info.table
|
281
|
+
auto &table = GetEntry<TableCatalogEntry>(context, schema.name, info.table);
|
282
282
|
return schema.CreateIndex(context, info, table);
|
283
283
|
}
|
284
284
|
|
@@ -19,47 +19,23 @@ string IndexCatalogEntry::ToSQL() const {
|
|
19
19
|
return sql;
|
20
20
|
}
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
unique_ptr<CreateIndexInfo> IndexCatalogEntry::Deserialize(Deserializer &source, ClientContext &context) {
|
41
|
-
// here we deserialize the index metadata in the following order:
|
42
|
-
// schema name, table schema name, table name, index name, sql, index type, index constraint type, expression list,
|
43
|
-
// parsed expression list, column IDs
|
44
|
-
|
45
|
-
auto create_index_info = make_uniq<CreateIndexInfo>();
|
46
|
-
|
47
|
-
FieldReader reader(source);
|
48
|
-
|
49
|
-
create_index_info->schema = reader.ReadRequired<string>();
|
50
|
-
create_index_info->table = make_uniq<BaseTableRef>();
|
51
|
-
create_index_info->table->schema_name = create_index_info->schema;
|
52
|
-
create_index_info->table->table_name = reader.ReadRequired<string>();
|
53
|
-
create_index_info->index_name = reader.ReadRequired<string>();
|
54
|
-
create_index_info->sql = reader.ReadRequired<string>();
|
55
|
-
create_index_info->index_type = IndexType(reader.ReadRequired<uint8_t>());
|
56
|
-
create_index_info->constraint_type = IndexConstraintType(reader.ReadRequired<uint8_t>());
|
57
|
-
create_index_info->expressions = reader.ReadRequiredSerializableList<ParsedExpression>();
|
58
|
-
create_index_info->parsed_expressions = reader.ReadRequiredSerializableList<ParsedExpression>();
|
59
|
-
|
60
|
-
create_index_info->column_ids = reader.ReadRequiredList<idx_t>();
|
61
|
-
reader.Finalize();
|
62
|
-
return create_index_info;
|
22
|
+
unique_ptr<CreateInfo> IndexCatalogEntry::GetInfo() const {
|
23
|
+
auto result = make_uniq<CreateIndexInfo>();
|
24
|
+
result->schema = GetSchemaName();
|
25
|
+
result->table = GetTableName();
|
26
|
+
result->index_name = name;
|
27
|
+
result->sql = sql;
|
28
|
+
result->index_type = index->type;
|
29
|
+
result->constraint_type = index->constraint_type;
|
30
|
+
for (auto &expr : expressions) {
|
31
|
+
result->expressions.push_back(expr->Copy());
|
32
|
+
}
|
33
|
+
for (auto &expr : parsed_expressions) {
|
34
|
+
result->parsed_expressions.push_back(expr->Copy());
|
35
|
+
}
|
36
|
+
result->column_ids = index->column_ids;
|
37
|
+
result->temporary = temporary;
|
38
|
+
return std::move(result);
|
63
39
|
}
|
64
40
|
|
65
41
|
} // namespace duckdb
|
@@ -22,21 +22,13 @@ TableMacroCatalogEntry::TableMacroCatalogEntry(Catalog &catalog, SchemaCatalogEn
|
|
22
22
|
: MacroCatalogEntry(catalog, schema, info) {
|
23
23
|
}
|
24
24
|
|
25
|
-
unique_ptr<
|
25
|
+
unique_ptr<CreateInfo> MacroCatalogEntry::GetInfo() const {
|
26
26
|
auto info = make_uniq<CreateMacroInfo>(type);
|
27
27
|
info->catalog = catalog.GetName();
|
28
28
|
info->schema = schema.name;
|
29
29
|
info->name = name;
|
30
30
|
info->function = function->Copy();
|
31
|
-
return info;
|
32
|
-
}
|
33
|
-
void MacroCatalogEntry::Serialize(Serializer &serializer) const {
|
34
|
-
auto info = GetInfoForSerialization();
|
35
|
-
info->Serialize(serializer);
|
36
|
-
}
|
37
|
-
|
38
|
-
unique_ptr<CreateMacroInfo> MacroCatalogEntry::Deserialize(Deserializer &main_source, ClientContext &context) {
|
39
|
-
return unique_ptr_cast<CreateInfo, CreateMacroInfo>(CreateInfo::Deserialize(main_source));
|
31
|
+
return std::move(info);
|
40
32
|
}
|
41
33
|
|
42
34
|
} // namespace duckdb
|
@@ -33,20 +33,10 @@ SimilarCatalogEntry SchemaCatalogEntry::GetSimilarEntry(CatalogTransaction trans
|
|
33
33
|
return result;
|
34
34
|
}
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
}
|
41
|
-
|
42
|
-
unique_ptr<CreateSchemaInfo> SchemaCatalogEntry::Deserialize(Deserializer &source) {
|
43
|
-
auto info = make_uniq<CreateSchemaInfo>();
|
44
|
-
|
45
|
-
FieldReader reader(source);
|
46
|
-
info->schema = reader.ReadRequired<string>();
|
47
|
-
reader.Finalize();
|
48
|
-
|
49
|
-
return info;
|
36
|
+
unique_ptr<CreateInfo> SchemaCatalogEntry::GetInfo() const {
|
37
|
+
auto result = make_uniq<CreateSchemaInfo>();
|
38
|
+
result->schema = name;
|
39
|
+
return std::move(result);
|
50
40
|
}
|
51
41
|
|
52
42
|
string SchemaCatalogEntry::ToSQL() const {
|
@@ -18,34 +18,17 @@ SequenceCatalogEntry::SequenceCatalogEntry(Catalog &catalog, SchemaCatalogEntry
|
|
18
18
|
this->temporary = info.temporary;
|
19
19
|
}
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
}
|
33
|
-
|
34
|
-
unique_ptr<CreateSequenceInfo> SequenceCatalogEntry::Deserialize(Deserializer &source) {
|
35
|
-
auto info = make_uniq<CreateSequenceInfo>();
|
36
|
-
|
37
|
-
FieldReader reader(source);
|
38
|
-
info->schema = reader.ReadRequired<string>();
|
39
|
-
info->name = reader.ReadRequired<string>();
|
40
|
-
info->usage_count = reader.ReadRequired<uint64_t>();
|
41
|
-
info->increment = reader.ReadRequired<int64_t>();
|
42
|
-
info->min_value = reader.ReadRequired<int64_t>();
|
43
|
-
info->max_value = reader.ReadRequired<int64_t>();
|
44
|
-
info->start_value = reader.ReadRequired<int64_t>();
|
45
|
-
info->cycle = reader.ReadRequired<bool>();
|
46
|
-
reader.Finalize();
|
47
|
-
|
48
|
-
return info;
|
21
|
+
unique_ptr<CreateInfo> SequenceCatalogEntry::GetInfo() const {
|
22
|
+
auto result = make_uniq<CreateSequenceInfo>();
|
23
|
+
result->schema = schema.name;
|
24
|
+
result->name = name;
|
25
|
+
result->usage_count = usage_count;
|
26
|
+
result->increment = increment;
|
27
|
+
result->min_value = min_value;
|
28
|
+
result->max_value = max_value;
|
29
|
+
result->start_value = counter;
|
30
|
+
result->cycle = cycle;
|
31
|
+
return std::move(result);
|
49
32
|
}
|
50
33
|
|
51
34
|
string SequenceCatalogEntry::ToSQL() const {
|
@@ -56,42 +56,16 @@ vector<LogicalType> TableCatalogEntry::GetTypes() {
|
|
56
56
|
return types;
|
57
57
|
}
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
result
|
62
|
-
result
|
63
|
-
result
|
64
|
-
result
|
65
|
-
result
|
59
|
+
unique_ptr<CreateInfo> TableCatalogEntry::GetInfo() const {
|
60
|
+
auto result = make_uniq<CreateTableInfo>();
|
61
|
+
result->catalog = catalog.GetName();
|
62
|
+
result->schema = schema.name;
|
63
|
+
result->table = name;
|
64
|
+
result->columns = columns.Copy();
|
65
|
+
result->constraints.reserve(constraints.size());
|
66
66
|
std::for_each(constraints.begin(), constraints.end(),
|
67
|
-
[&result](const unique_ptr<Constraint> &c) { result
|
68
|
-
return result;
|
69
|
-
}
|
70
|
-
|
71
|
-
void TableCatalogEntry::Serialize(Serializer &serializer) const {
|
72
|
-
D_ASSERT(!internal);
|
73
|
-
const auto info = GetTableInfoForSerialization();
|
74
|
-
FieldWriter writer(serializer);
|
75
|
-
writer.WriteString(info.catalog);
|
76
|
-
writer.WriteString(info.schema);
|
77
|
-
writer.WriteString(info.table);
|
78
|
-
info.columns.Serialize(writer);
|
79
|
-
writer.WriteSerializableList(info.constraints);
|
80
|
-
writer.Finalize();
|
81
|
-
}
|
82
|
-
|
83
|
-
unique_ptr<CreateTableInfo> TableCatalogEntry::Deserialize(Deserializer &source, ClientContext &context) {
|
84
|
-
auto info = make_uniq<CreateTableInfo>();
|
85
|
-
|
86
|
-
FieldReader reader(source);
|
87
|
-
info->catalog = reader.ReadRequired<string>();
|
88
|
-
info->schema = reader.ReadRequired<string>();
|
89
|
-
info->table = reader.ReadRequired<string>();
|
90
|
-
info->columns = ColumnList::Deserialize(reader);
|
91
|
-
info->constraints = reader.ReadRequiredSerializableList<Constraint>();
|
92
|
-
reader.Finalize();
|
93
|
-
|
94
|
-
return info;
|
67
|
+
[&result](const unique_ptr<Constraint> &c) { result->constraints.emplace_back(c->Copy()); });
|
68
|
+
return std::move(result);
|
95
69
|
}
|
96
70
|
|
97
71
|
string TableCatalogEntry::ColumnsToSQL(const ColumnList &columns, const vector<unique_ptr<Constraint>> &constraints) {
|
@@ -162,11 +136,10 @@ string TableCatalogEntry::ColumnsToSQL(const ColumnList &columns, const vector<u
|
|
162
136
|
// single column unique: insert constraint here
|
163
137
|
ss << " UNIQUE";
|
164
138
|
}
|
165
|
-
if (column.DefaultValue()) {
|
166
|
-
ss << " DEFAULT(" << column.DefaultValue()->ToString() << ")";
|
167
|
-
}
|
168
139
|
if (column.Generated()) {
|
169
140
|
ss << " GENERATED ALWAYS AS(" << column.GeneratedExpression().ToString() << ")";
|
141
|
+
} else if (column.DefaultValue()) {
|
142
|
+
ss << " DEFAULT(" << column.DefaultValue()->ToString() << ")";
|
170
143
|
}
|
171
144
|
}
|
172
145
|
// print any extra constraints that still need to be printed
|
@@ -25,6 +25,17 @@ ViewCatalogEntry::ViewCatalogEntry(Catalog &catalog, SchemaCatalogEntry &schema,
|
|
25
25
|
Initialize(info);
|
26
26
|
}
|
27
27
|
|
28
|
+
unique_ptr<CreateInfo> ViewCatalogEntry::GetInfo() const {
|
29
|
+
auto result = make_uniq<CreateViewInfo>();
|
30
|
+
result->schema = schema.name;
|
31
|
+
result->view_name = name;
|
32
|
+
result->sql = sql;
|
33
|
+
result->query = unique_ptr_cast<SQLStatement, SelectStatement>(query->Copy());
|
34
|
+
result->aliases = aliases;
|
35
|
+
result->types = types;
|
36
|
+
return std::move(result);
|
37
|
+
}
|
38
|
+
|
28
39
|
unique_ptr<CatalogEntry> ViewCatalogEntry::AlterEntry(ClientContext &context, AlterInfo &info) {
|
29
40
|
D_ASSERT(!internal);
|
30
41
|
if (info.type != AlterType::ALTER_VIEW) {
|
@@ -43,33 +54,6 @@ unique_ptr<CatalogEntry> ViewCatalogEntry::AlterEntry(ClientContext &context, Al
|
|
43
54
|
}
|
44
55
|
}
|
45
56
|
|
46
|
-
void ViewCatalogEntry::Serialize(Serializer &serializer) const {
|
47
|
-
D_ASSERT(!internal);
|
48
|
-
FieldWriter writer(serializer);
|
49
|
-
writer.WriteString(schema.name);
|
50
|
-
writer.WriteString(name);
|
51
|
-
writer.WriteString(sql);
|
52
|
-
writer.WriteSerializable(*query);
|
53
|
-
writer.WriteList<string>(aliases);
|
54
|
-
writer.WriteRegularSerializableList<LogicalType>(types);
|
55
|
-
writer.Finalize();
|
56
|
-
}
|
57
|
-
|
58
|
-
unique_ptr<CreateViewInfo> ViewCatalogEntry::Deserialize(Deserializer &source, ClientContext &context) {
|
59
|
-
auto info = make_uniq<CreateViewInfo>();
|
60
|
-
|
61
|
-
FieldReader reader(source);
|
62
|
-
info->schema = reader.ReadRequired<string>();
|
63
|
-
info->view_name = reader.ReadRequired<string>();
|
64
|
-
info->sql = reader.ReadRequired<string>();
|
65
|
-
info->query = reader.ReadRequiredSerializable<SelectStatement>();
|
66
|
-
info->aliases = reader.ReadRequiredList<string>();
|
67
|
-
info->types = reader.ReadRequiredSerializableList<LogicalType, LogicalType>();
|
68
|
-
reader.Finalize();
|
69
|
-
|
70
|
-
return info;
|
71
|
-
}
|
72
|
-
|
73
57
|
string ViewCatalogEntry::ToSQL() const {
|
74
58
|
if (sql.empty()) {
|
75
59
|
//! Return empty sql with view name so pragma view_tables don't complain
|
@@ -1,6 +1,8 @@
|
|
1
1
|
#include "duckdb/catalog/catalog_entry.hpp"
|
2
|
-
|
2
|
+
#include "duckdb/parser/parsed_data/create_info.hpp"
|
3
3
|
#include "duckdb/catalog/catalog.hpp"
|
4
|
+
#include "duckdb/common/serializer/binary_serializer.hpp"
|
5
|
+
#include "duckdb/common/serializer/binary_deserializer.hpp"
|
4
6
|
|
5
7
|
namespace duckdb {
|
6
8
|
|
@@ -31,6 +33,10 @@ unique_ptr<CatalogEntry> CatalogEntry::Copy(ClientContext &context) const {
|
|
31
33
|
throw InternalException("Unsupported copy type for catalog entry!");
|
32
34
|
}
|
33
35
|
|
36
|
+
unique_ptr<CreateInfo> CatalogEntry::GetInfo() const {
|
37
|
+
throw InternalException("Unsupported type for CatalogEntry::GetInfo!");
|
38
|
+
}
|
39
|
+
|
34
40
|
string CatalogEntry::ToSQL() const {
|
35
41
|
throw InternalException("Unsupported catalog type for ToSQL()");
|
36
42
|
}
|
@@ -44,6 +50,24 @@ SchemaCatalogEntry &CatalogEntry::ParentSchema() {
|
|
44
50
|
}
|
45
51
|
// LCOV_EXCL_STOP
|
46
52
|
|
53
|
+
void CatalogEntry::Serialize(Serializer &serializer) const {
|
54
|
+
const auto info = GetInfo();
|
55
|
+
info->Serialize(serializer);
|
56
|
+
}
|
57
|
+
|
58
|
+
unique_ptr<CreateInfo> CatalogEntry::Deserialize(Deserializer &source) {
|
59
|
+
return CreateInfo::Deserialize(source);
|
60
|
+
}
|
61
|
+
|
62
|
+
void CatalogEntry::FormatSerialize(FormatSerializer &serializer) const {
|
63
|
+
const auto info = GetInfo();
|
64
|
+
info->FormatSerialize(serializer);
|
65
|
+
}
|
66
|
+
|
67
|
+
unique_ptr<CreateInfo> CatalogEntry::FormatDeserialize(FormatDeserializer &deserializer) {
|
68
|
+
return CreateInfo::FormatDeserialize(deserializer);
|
69
|
+
}
|
70
|
+
|
47
71
|
void CatalogEntry::Verify(Catalog &catalog_p) {
|
48
72
|
}
|
49
73
|
|
@@ -88,6 +88,8 @@
|
|
88
88
|
#include "duckdb/parser/parsed_data/alter_table_info.hpp"
|
89
89
|
#include "duckdb/parser/parsed_data/create_info.hpp"
|
90
90
|
#include "duckdb/parser/parsed_data/create_sequence_info.hpp"
|
91
|
+
#include "duckdb/parser/parsed_data/load_info.hpp"
|
92
|
+
#include "duckdb/parser/parsed_data/parse_info.hpp"
|
91
93
|
#include "duckdb/parser/parsed_data/pragma_info.hpp"
|
92
94
|
#include "duckdb/parser/parsed_data/sample_options.hpp"
|
93
95
|
#include "duckdb/parser/parsed_data/transaction_info.hpp"
|
@@ -217,6 +219,29 @@ AggregateType EnumUtil::FromString<AggregateType>(const char *value) {
|
|
217
219
|
throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
|
218
220
|
}
|
219
221
|
|
222
|
+
template<>
|
223
|
+
const char* EnumUtil::ToChars<AlterForeignKeyType>(AlterForeignKeyType value) {
|
224
|
+
switch(value) {
|
225
|
+
case AlterForeignKeyType::AFT_ADD:
|
226
|
+
return "AFT_ADD";
|
227
|
+
case AlterForeignKeyType::AFT_DELETE:
|
228
|
+
return "AFT_DELETE";
|
229
|
+
default:
|
230
|
+
throw NotImplementedException(StringUtil::Format("Enum value: '%d' not implemented", value));
|
231
|
+
}
|
232
|
+
}
|
233
|
+
|
234
|
+
template<>
|
235
|
+
AlterForeignKeyType EnumUtil::FromString<AlterForeignKeyType>(const char *value) {
|
236
|
+
if (StringUtil::Equals(value, "AFT_ADD")) {
|
237
|
+
return AlterForeignKeyType::AFT_ADD;
|
238
|
+
}
|
239
|
+
if (StringUtil::Equals(value, "AFT_DELETE")) {
|
240
|
+
return AlterForeignKeyType::AFT_DELETE;
|
241
|
+
}
|
242
|
+
throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
|
243
|
+
}
|
244
|
+
|
220
245
|
template<>
|
221
246
|
const char* EnumUtil::ToChars<AlterScalarFunctionType>(AlterScalarFunctionType value) {
|
222
247
|
switch(value) {
|
@@ -2274,6 +2299,39 @@ FunctionSideEffects EnumUtil::FromString<FunctionSideEffects>(const char *value)
|
|
2274
2299
|
throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
|
2275
2300
|
}
|
2276
2301
|
|
2302
|
+
template<>
|
2303
|
+
const char* EnumUtil::ToChars<IndexConstraintType>(IndexConstraintType value) {
|
2304
|
+
switch(value) {
|
2305
|
+
case IndexConstraintType::NONE:
|
2306
|
+
return "NONE";
|
2307
|
+
case IndexConstraintType::UNIQUE:
|
2308
|
+
return "UNIQUE";
|
2309
|
+
case IndexConstraintType::PRIMARY:
|
2310
|
+
return "PRIMARY";
|
2311
|
+
case IndexConstraintType::FOREIGN:
|
2312
|
+
return "FOREIGN";
|
2313
|
+
default:
|
2314
|
+
throw NotImplementedException(StringUtil::Format("Enum value: '%d' not implemented", value));
|
2315
|
+
}
|
2316
|
+
}
|
2317
|
+
|
2318
|
+
template<>
|
2319
|
+
IndexConstraintType EnumUtil::FromString<IndexConstraintType>(const char *value) {
|
2320
|
+
if (StringUtil::Equals(value, "NONE")) {
|
2321
|
+
return IndexConstraintType::NONE;
|
2322
|
+
}
|
2323
|
+
if (StringUtil::Equals(value, "UNIQUE")) {
|
2324
|
+
return IndexConstraintType::UNIQUE;
|
2325
|
+
}
|
2326
|
+
if (StringUtil::Equals(value, "PRIMARY")) {
|
2327
|
+
return IndexConstraintType::PRIMARY;
|
2328
|
+
}
|
2329
|
+
if (StringUtil::Equals(value, "FOREIGN")) {
|
2330
|
+
return IndexConstraintType::FOREIGN;
|
2331
|
+
}
|
2332
|
+
throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
|
2333
|
+
}
|
2334
|
+
|
2277
2335
|
template<>
|
2278
2336
|
const char* EnumUtil::ToChars<IndexType>(IndexType value) {
|
2279
2337
|
switch(value) {
|
@@ -2482,6 +2540,34 @@ KeywordCategory EnumUtil::FromString<KeywordCategory>(const char *value) {
|
|
2482
2540
|
throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
|
2483
2541
|
}
|
2484
2542
|
|
2543
|
+
template<>
|
2544
|
+
const char* EnumUtil::ToChars<LoadType>(LoadType value) {
|
2545
|
+
switch(value) {
|
2546
|
+
case LoadType::LOAD:
|
2547
|
+
return "LOAD";
|
2548
|
+
case LoadType::INSTALL:
|
2549
|
+
return "INSTALL";
|
2550
|
+
case LoadType::FORCE_INSTALL:
|
2551
|
+
return "FORCE_INSTALL";
|
2552
|
+
default:
|
2553
|
+
throw NotImplementedException(StringUtil::Format("Enum value: '%d' not implemented", value));
|
2554
|
+
}
|
2555
|
+
}
|
2556
|
+
|
2557
|
+
template<>
|
2558
|
+
LoadType EnumUtil::FromString<LoadType>(const char *value) {
|
2559
|
+
if (StringUtil::Equals(value, "LOAD")) {
|
2560
|
+
return LoadType::LOAD;
|
2561
|
+
}
|
2562
|
+
if (StringUtil::Equals(value, "INSTALL")) {
|
2563
|
+
return LoadType::INSTALL;
|
2564
|
+
}
|
2565
|
+
if (StringUtil::Equals(value, "FORCE_INSTALL")) {
|
2566
|
+
return LoadType::FORCE_INSTALL;
|
2567
|
+
}
|
2568
|
+
throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
|
2569
|
+
}
|
2570
|
+
|
2485
2571
|
template<>
|
2486
2572
|
const char* EnumUtil::ToChars<LogicalOperatorType>(LogicalOperatorType value) {
|
2487
2573
|
switch(value) {
|
@@ -3558,6 +3644,79 @@ OutputStream EnumUtil::FromString<OutputStream>(const char *value) {
|
|
3558
3644
|
throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
|
3559
3645
|
}
|
3560
3646
|
|
3647
|
+
template<>
|
3648
|
+
const char* EnumUtil::ToChars<ParseInfoType>(ParseInfoType value) {
|
3649
|
+
switch(value) {
|
3650
|
+
case ParseInfoType::ALTER_INFO:
|
3651
|
+
return "ALTER_INFO";
|
3652
|
+
case ParseInfoType::ATTACH_INFO:
|
3653
|
+
return "ATTACH_INFO";
|
3654
|
+
case ParseInfoType::COPY_INFO:
|
3655
|
+
return "COPY_INFO";
|
3656
|
+
case ParseInfoType::CREATE_INFO:
|
3657
|
+
return "CREATE_INFO";
|
3658
|
+
case ParseInfoType::DETACH_INFO:
|
3659
|
+
return "DETACH_INFO";
|
3660
|
+
case ParseInfoType::DROP_INFO:
|
3661
|
+
return "DROP_INFO";
|
3662
|
+
case ParseInfoType::BOUND_EXPORT_DATA:
|
3663
|
+
return "BOUND_EXPORT_DATA";
|
3664
|
+
case ParseInfoType::LOAD_INFO:
|
3665
|
+
return "LOAD_INFO";
|
3666
|
+
case ParseInfoType::PRAGMA_INFO:
|
3667
|
+
return "PRAGMA_INFO";
|
3668
|
+
case ParseInfoType::SHOW_SELECT_INFO:
|
3669
|
+
return "SHOW_SELECT_INFO";
|
3670
|
+
case ParseInfoType::TRANSACTION_INFO:
|
3671
|
+
return "TRANSACTION_INFO";
|
3672
|
+
case ParseInfoType::VACUUM_INFO:
|
3673
|
+
return "VACUUM_INFO";
|
3674
|
+
default:
|
3675
|
+
throw NotImplementedException(StringUtil::Format("Enum value: '%d' not implemented", value));
|
3676
|
+
}
|
3677
|
+
}
|
3678
|
+
|
3679
|
+
template<>
|
3680
|
+
ParseInfoType EnumUtil::FromString<ParseInfoType>(const char *value) {
|
3681
|
+
if (StringUtil::Equals(value, "ALTER_INFO")) {
|
3682
|
+
return ParseInfoType::ALTER_INFO;
|
3683
|
+
}
|
3684
|
+
if (StringUtil::Equals(value, "ATTACH_INFO")) {
|
3685
|
+
return ParseInfoType::ATTACH_INFO;
|
3686
|
+
}
|
3687
|
+
if (StringUtil::Equals(value, "COPY_INFO")) {
|
3688
|
+
return ParseInfoType::COPY_INFO;
|
3689
|
+
}
|
3690
|
+
if (StringUtil::Equals(value, "CREATE_INFO")) {
|
3691
|
+
return ParseInfoType::CREATE_INFO;
|
3692
|
+
}
|
3693
|
+
if (StringUtil::Equals(value, "DETACH_INFO")) {
|
3694
|
+
return ParseInfoType::DETACH_INFO;
|
3695
|
+
}
|
3696
|
+
if (StringUtil::Equals(value, "DROP_INFO")) {
|
3697
|
+
return ParseInfoType::DROP_INFO;
|
3698
|
+
}
|
3699
|
+
if (StringUtil::Equals(value, "BOUND_EXPORT_DATA")) {
|
3700
|
+
return ParseInfoType::BOUND_EXPORT_DATA;
|
3701
|
+
}
|
3702
|
+
if (StringUtil::Equals(value, "LOAD_INFO")) {
|
3703
|
+
return ParseInfoType::LOAD_INFO;
|
3704
|
+
}
|
3705
|
+
if (StringUtil::Equals(value, "PRAGMA_INFO")) {
|
3706
|
+
return ParseInfoType::PRAGMA_INFO;
|
3707
|
+
}
|
3708
|
+
if (StringUtil::Equals(value, "SHOW_SELECT_INFO")) {
|
3709
|
+
return ParseInfoType::SHOW_SELECT_INFO;
|
3710
|
+
}
|
3711
|
+
if (StringUtil::Equals(value, "TRANSACTION_INFO")) {
|
3712
|
+
return ParseInfoType::TRANSACTION_INFO;
|
3713
|
+
}
|
3714
|
+
if (StringUtil::Equals(value, "VACUUM_INFO")) {
|
3715
|
+
return ParseInfoType::VACUUM_INFO;
|
3716
|
+
}
|
3717
|
+
throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
|
3718
|
+
}
|
3719
|
+
|
3561
3720
|
template<>
|
3562
3721
|
const char* EnumUtil::ToChars<ParserExtensionResultType>(ParserExtensionResultType value) {
|
3563
3722
|
switch(value) {
|
@@ -4718,6 +4877,29 @@ SimplifiedTokenType EnumUtil::FromString<SimplifiedTokenType>(const char *value)
|
|
4718
4877
|
throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
|
4719
4878
|
}
|
4720
4879
|
|
4880
|
+
template<>
|
4881
|
+
const char* EnumUtil::ToChars<SinkCombineResultType>(SinkCombineResultType value) {
|
4882
|
+
switch(value) {
|
4883
|
+
case SinkCombineResultType::FINISHED:
|
4884
|
+
return "FINISHED";
|
4885
|
+
case SinkCombineResultType::BLOCKED:
|
4886
|
+
return "BLOCKED";
|
4887
|
+
default:
|
4888
|
+
throw NotImplementedException(StringUtil::Format("Enum value: '%d' not implemented", value));
|
4889
|
+
}
|
4890
|
+
}
|
4891
|
+
|
4892
|
+
template<>
|
4893
|
+
SinkCombineResultType EnumUtil::FromString<SinkCombineResultType>(const char *value) {
|
4894
|
+
if (StringUtil::Equals(value, "FINISHED")) {
|
4895
|
+
return SinkCombineResultType::FINISHED;
|
4896
|
+
}
|
4897
|
+
if (StringUtil::Equals(value, "BLOCKED")) {
|
4898
|
+
return SinkCombineResultType::BLOCKED;
|
4899
|
+
}
|
4900
|
+
throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
|
4901
|
+
}
|
4902
|
+
|
4721
4903
|
template<>
|
4722
4904
|
const char* EnumUtil::ToChars<SinkFinalizeType>(SinkFinalizeType value) {
|
4723
4905
|
switch(value) {
|
@@ -4725,6 +4907,8 @@ const char* EnumUtil::ToChars<SinkFinalizeType>(SinkFinalizeType value) {
|
|
4725
4907
|
return "READY";
|
4726
4908
|
case SinkFinalizeType::NO_OUTPUT_POSSIBLE:
|
4727
4909
|
return "NO_OUTPUT_POSSIBLE";
|
4910
|
+
case SinkFinalizeType::BLOCKED:
|
4911
|
+
return "BLOCKED";
|
4728
4912
|
default:
|
4729
4913
|
throw NotImplementedException(StringUtil::Format("Enum value: '%d' not implemented", value));
|
4730
4914
|
}
|
@@ -4738,6 +4922,9 @@ SinkFinalizeType EnumUtil::FromString<SinkFinalizeType>(const char *value) {
|
|
4738
4922
|
if (StringUtil::Equals(value, "NO_OUTPUT_POSSIBLE")) {
|
4739
4923
|
return SinkFinalizeType::NO_OUTPUT_POSSIBLE;
|
4740
4924
|
}
|
4925
|
+
if (StringUtil::Equals(value, "BLOCKED")) {
|
4926
|
+
return SinkFinalizeType::BLOCKED;
|
4927
|
+
}
|
4741
4928
|
throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
|
4742
4929
|
}
|
4743
4930
|
|
@@ -321,7 +321,6 @@ struct EnumTypeInfoTemplated : public EnumTypeInfo {
|
|
321
321
|
}
|
322
322
|
|
323
323
|
static shared_ptr<EnumTypeInfoTemplated> Deserialize(FieldReader &reader, uint32_t size, string enum_name) {
|
324
|
-
|
325
324
|
Vector values_insert_order(LogicalType::VARCHAR, size);
|
326
325
|
values_insert_order.Deserialize(size, reader.GetSource());
|
327
326
|
return make_shared<EnumTypeInfoTemplated>(std::move(enum_name), values_insert_order, size);
|
@@ -451,7 +450,7 @@ shared_ptr<ExtraTypeInfo> EnumTypeInfo::Deserialize(FieldReader &reader) {
|
|
451
450
|
}
|
452
451
|
|
453
452
|
shared_ptr<ExtraTypeInfo> EnumTypeInfo::FormatDeserialize(FormatDeserializer &deserializer) {
|
454
|
-
auto enum_size = deserializer.ReadProperty<
|
453
|
+
auto enum_size = deserializer.ReadProperty<idx_t>("enum_size");
|
455
454
|
auto enum_internal_type = EnumTypeInfo::DictType(enum_size);
|
456
455
|
switch (enum_internal_type) {
|
457
456
|
case PhysicalType::UINT8:
|
@@ -5,6 +5,9 @@ namespace duckdb {
|
|
5
5
|
void BinaryDeserializer::SetTag(const char *tag) {
|
6
6
|
current_tag = tag;
|
7
7
|
stack.back().read_field_count++;
|
8
|
+
if (stack.back().read_field_count > stack.back().expected_field_count) {
|
9
|
+
throw SerializationException("Attempting to read a required field, but field is missing");
|
10
|
+
}
|
8
11
|
}
|
9
12
|
|
10
13
|
//===--------------------------------------------------------------------===//
|