duckdb 0.7.2-dev2867.0 → 0.7.2-dev3117.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 +2 -0
- package/package.json +1 -1
- package/src/duckdb/extension/icu/icu-datepart.cpp +5 -1
- package/src/duckdb/extension/json/include/json_deserializer.hpp +1 -0
- package/src/duckdb/extension/json/include/json_serializer.hpp +8 -1
- package/src/duckdb/extension/json/json_functions/json_serialize_sql.cpp +1 -3
- package/src/duckdb/extension/json/json_functions/json_structure.cpp +3 -3
- package/src/duckdb/extension/json/json_functions/json_transform.cpp +3 -2
- package/src/duckdb/extension/parquet/parquet-extension.cpp +9 -7
- package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +18 -7
- package/src/duckdb/src/catalog/default/default_functions.cpp +2 -0
- package/src/duckdb/src/common/arrow/arrow_appender.cpp +3 -3
- package/src/duckdb/src/common/arrow/arrow_converter.cpp +2 -2
- package/src/duckdb/src/common/enum_util.cpp +5908 -0
- package/src/duckdb/src/common/enums/expression_type.cpp +216 -4
- package/src/duckdb/src/common/enums/join_type.cpp +6 -5
- package/src/duckdb/src/common/enums/physical_operator_type.cpp +2 -0
- package/src/duckdb/src/common/exception.cpp +1 -1
- package/src/duckdb/src/common/exception_format_value.cpp +2 -2
- package/src/duckdb/src/common/multi_file_reader.cpp +14 -0
- package/src/duckdb/src/common/serializer/binary_deserializer.cpp +143 -0
- package/src/duckdb/src/common/serializer/binary_serializer.cpp +160 -0
- package/src/duckdb/src/common/sort/partition_state.cpp +1 -1
- package/src/duckdb/src/common/string_util.cpp +6 -1
- package/src/duckdb/src/common/types/row/tuple_data_scatter_gather.cpp +3 -3
- package/src/duckdb/src/common/types.cpp +11 -10
- package/src/duckdb/src/common/vector_operations/is_distinct_from.cpp +4 -4
- package/src/duckdb/src/core_functions/function_list.cpp +2 -0
- package/src/duckdb/src/core_functions/scalar/date/date_part.cpp +2 -1
- package/src/duckdb/src/core_functions/scalar/list/list_sort.cpp +2 -3
- package/src/duckdb/src/core_functions/scalar/string/format_bytes.cpp +29 -0
- package/src/duckdb/src/execution/aggregate_hashtable.cpp +3 -3
- package/src/duckdb/src/execution/index/art/art.cpp +5 -1
- package/src/duckdb/src/execution/operator/aggregate/distinct_aggregate_data.cpp +1 -1
- package/src/duckdb/src/execution/operator/aggregate/grouped_aggregate_data.cpp +2 -2
- package/src/duckdb/src/execution/operator/aggregate/physical_hash_aggregate.cpp +65 -45
- package/src/duckdb/src/execution/operator/aggregate/physical_perfecthash_aggregate.cpp +17 -11
- package/src/duckdb/src/execution/operator/aggregate/physical_ungrouped_aggregate.cpp +32 -39
- package/src/duckdb/src/execution/operator/aggregate/physical_window.cpp +10 -9
- package/src/duckdb/src/execution/operator/helper/physical_batch_collector.cpp +4 -4
- package/src/duckdb/src/execution/operator/helper/physical_explain_analyze.cpp +6 -21
- package/src/duckdb/src/execution/operator/helper/physical_limit.cpp +13 -13
- package/src/duckdb/src/execution/operator/helper/physical_limit_percent.cpp +15 -14
- package/src/duckdb/src/execution/operator/helper/physical_load.cpp +3 -2
- package/src/duckdb/src/execution/operator/helper/physical_materialized_collector.cpp +4 -4
- package/src/duckdb/src/execution/operator/helper/physical_pragma.cpp +4 -2
- package/src/duckdb/src/execution/operator/helper/physical_prepare.cpp +4 -2
- package/src/duckdb/src/execution/operator/helper/physical_reservoir_sample.cpp +10 -8
- package/src/duckdb/src/execution/operator/helper/physical_reset.cpp +4 -3
- package/src/duckdb/src/execution/operator/helper/physical_set.cpp +7 -6
- package/src/duckdb/src/execution/operator/helper/physical_streaming_sample.cpp +2 -1
- package/src/duckdb/src/execution/operator/helper/physical_transaction.cpp +4 -2
- package/src/duckdb/src/execution/operator/helper/physical_vacuum.cpp +8 -8
- package/src/duckdb/src/execution/operator/join/physical_asof_join.cpp +17 -16
- package/src/duckdb/src/execution/operator/join/physical_blockwise_nl_join.cpp +12 -9
- package/src/duckdb/src/execution/operator/join/physical_comparison_join.cpp +2 -1
- package/src/duckdb/src/execution/operator/join/physical_cross_product.cpp +3 -4
- package/src/duckdb/src/execution/operator/join/physical_delim_join.cpp +5 -5
- package/src/duckdb/src/execution/operator/join/physical_hash_join.cpp +16 -15
- package/src/duckdb/src/execution/operator/join/physical_iejoin.cpp +13 -12
- package/src/duckdb/src/execution/operator/join/physical_nested_loop_join.cpp +12 -10
- package/src/duckdb/src/execution/operator/join/physical_piecewise_merge_join.cpp +13 -11
- package/src/duckdb/src/execution/operator/join/physical_positional_join.cpp +8 -6
- package/src/duckdb/src/execution/operator/join/physical_range_join.cpp +1 -1
- package/src/duckdb/src/execution/operator/order/physical_order.cpp +13 -13
- package/src/duckdb/src/execution/operator/order/physical_top_n.cpp +8 -8
- package/src/duckdb/src/execution/operator/persistent/physical_batch_copy_to_file.cpp +165 -0
- package/src/duckdb/src/execution/operator/persistent/physical_batch_insert.cpp +160 -145
- package/src/duckdb/src/execution/operator/persistent/physical_copy_to_file.cpp +11 -26
- package/src/duckdb/src/execution/operator/persistent/physical_delete.cpp +14 -19
- package/src/duckdb/src/execution/operator/persistent/physical_export.cpp +7 -6
- package/src/duckdb/src/execution/operator/persistent/physical_insert.cpp +18 -30
- package/src/duckdb/src/execution/operator/persistent/physical_update.cpp +14 -18
- package/src/duckdb/src/execution/operator/scan/physical_column_data_scan.cpp +6 -4
- package/src/duckdb/src/execution/operator/scan/physical_dummy_scan.cpp +4 -19
- package/src/duckdb/src/execution/operator/scan/physical_empty_result.cpp +3 -2
- package/src/duckdb/src/execution/operator/scan/physical_positional_scan.cpp +14 -5
- package/src/duckdb/src/execution/operator/scan/physical_table_scan.cpp +6 -4
- package/src/duckdb/src/execution/operator/schema/physical_alter.cpp +3 -19
- package/src/duckdb/src/execution/operator/schema/physical_attach.cpp +13 -25
- package/src/duckdb/src/execution/operator/schema/physical_create_function.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_create_index.cpp +8 -9
- package/src/duckdb/src/execution/operator/schema/physical_create_schema.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_create_sequence.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_create_table.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_create_type.cpp +9 -26
- package/src/duckdb/src/execution/operator/schema/physical_create_view.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_detach.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_drop.cpp +3 -19
- package/src/duckdb/src/execution/operator/set/physical_recursive_cte.cpp +9 -8
- package/src/duckdb/src/execution/operator/set/physical_union.cpp +1 -1
- package/src/duckdb/src/execution/partitionable_hashtable.cpp +2 -2
- package/src/duckdb/src/execution/physical_operator.cpp +11 -5
- package/src/duckdb/src/execution/physical_plan/plan_copy_to_file.cpp +25 -4
- package/src/duckdb/src/execution/physical_plan/plan_sample.cpp +2 -1
- package/src/duckdb/src/execution/radix_partitioned_hashtable.cpp +16 -16
- package/src/duckdb/src/function/scalar/operators/arithmetic.cpp +5 -4
- package/src/duckdb/src/function/table/arrow_conversion.cpp +3 -3
- package/src/duckdb/src/function/table/copy_csv.cpp +85 -29
- package/src/duckdb/src/function/table/read_csv.cpp +17 -11
- package/src/duckdb/src/function/table/system/duckdb_settings.cpp +2 -1
- package/src/duckdb/src/function/table/system/duckdb_types.cpp +2 -1
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_catalog_entry.hpp +7 -1
- package/src/duckdb/src/include/duckdb/common/enum_util.hpp +958 -0
- package/src/duckdb/src/include/duckdb/common/enums/join_type.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/enums/operator_result_type.hpp +16 -4
- package/src/duckdb/src/include/duckdb/common/enums/physical_operator_type.hpp +1 -0
- package/src/duckdb/src/include/duckdb/common/exception.hpp +4 -4
- package/src/duckdb/src/include/duckdb/common/exception_format_value.hpp +3 -2
- package/src/duckdb/src/include/duckdb/common/multi_file_reader_options.hpp +44 -0
- package/src/duckdb/src/include/duckdb/common/optional_idx.hpp +45 -0
- package/src/duckdb/src/include/duckdb/common/serializer/binary_deserializer.hpp +93 -0
- package/src/duckdb/src/include/duckdb/common/serializer/binary_serializer.hpp +92 -0
- package/src/duckdb/src/include/duckdb/common/serializer/format_deserializer.hpp +7 -3
- package/src/duckdb/src/include/duckdb/common/serializer/format_serializer.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/set.hpp +2 -1
- package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_collection.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_segment.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types.hpp +1 -0
- package/src/duckdb/src/include/duckdb/common/vector.hpp +61 -14
- package/src/duckdb/src/include/duckdb/core_functions/scalar/string_functions.hpp +15 -0
- package/src/duckdb/src/include/duckdb/execution/aggregate_hashtable.hpp +3 -2
- package/src/duckdb/src/include/duckdb/execution/executor.hpp +10 -1
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/distinct_aggregate_data.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/grouped_aggregate_data.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_hash_aggregate.hpp +8 -11
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_perfecthash_aggregate.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_ungrouped_aggregate.hpp +3 -7
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_window.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_batch_collector.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_explain_analyze.hpp +2 -5
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_limit.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_limit_percent.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_load.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_materialized_collector.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_pragma.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_prepare.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_reservoir_sample.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_reset.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_set.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_transaction.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_vacuum.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_asof_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_blockwise_nl_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_cross_product.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_delim_join.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_hash_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_iejoin.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_nested_loop_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_piecewise_merge_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_positional_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/order/physical_order.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/order/physical_top_n.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_batch_copy_to_file.hpp +68 -0
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_batch_insert.hpp +3 -5
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_copy_to_file.hpp +4 -5
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_delete.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_export.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_insert.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_update.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_column_data_scan.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_dummy_scan.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_empty_result.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_positional_scan.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_table_scan.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_alter.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_attach.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_function.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_index.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_schema.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_sequence.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_table.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_type.hpp +2 -5
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_view.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_detach.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_drop.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/set/physical_recursive_cte.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/partitionable_hashtable.hpp +3 -3
- package/src/duckdb/src/include/duckdb/execution/physical_operator.hpp +7 -4
- package/src/duckdb/src/include/duckdb/execution/physical_operator_states.hpp +26 -6
- package/src/duckdb/src/include/duckdb/execution/radix_partitioned_hashtable.hpp +6 -6
- package/src/duckdb/src/include/duckdb/function/aggregate_function.hpp +2 -1
- package/src/duckdb/src/include/duckdb/function/copy_function.hpp +32 -4
- package/src/duckdb/src/include/duckdb/function/table/read_csv.hpp +4 -2
- package/src/duckdb/src/include/duckdb/function/table_function.hpp +0 -1
- package/src/duckdb/src/include/duckdb/main/client_config.hpp +2 -0
- package/src/duckdb/src/include/duckdb/main/config.hpp +4 -0
- package/src/duckdb/src/include/duckdb/main/database.hpp +1 -3
- package/src/duckdb/src/include/duckdb/main/database_path_and_type.hpp +24 -0
- package/src/duckdb/src/include/duckdb/main/relation/setop_relation.hpp +1 -0
- package/src/duckdb/src/include/duckdb/parallel/event.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parallel/interrupt.hpp +63 -0
- package/src/duckdb/src/include/duckdb/parallel/pipeline.hpp +16 -3
- package/src/duckdb/src/include/duckdb/parallel/pipeline_executor.hpp +51 -7
- package/src/duckdb/src/include/duckdb/parallel/task.hpp +21 -2
- package/src/duckdb/src/include/duckdb/parallel/task_counter.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parallel/task_scheduler.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_data/sample_options.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/column_binding.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_columnref_expression.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/expression_binder/base_select_binder.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/expression_binder.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_aggregate.hpp +2 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_column_data_get.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_cteref.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delete.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delim_get.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_dummy_scan.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_expression_get.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_insert.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pivot.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_projection.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_recursive_cte.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_set_operation.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_unnest.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_update.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_window.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/query_node/bound_select_node.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/data_table.hpp +1 -0
- package/src/duckdb/src/include/duckdb/storage/optimistic_data_writer.hpp +46 -0
- package/src/duckdb/src/include/duckdb/storage/partial_block_manager.hpp +24 -3
- package/src/duckdb/src/include/duckdb/storage/table/column_checkpoint_state.hpp +46 -1
- package/src/duckdb/src/include/duckdb/storage/table/column_data.hpp +9 -10
- package/src/duckdb/src/include/duckdb/storage/table/column_segment.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/list_column_data.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/table/row_group.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/table/row_group_collection.hpp +1 -0
- package/src/duckdb/src/include/duckdb/storage/table/segment_base.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/segment_tree.hpp +22 -0
- package/src/duckdb/src/include/duckdb/storage/table/standard_column_data.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/table/struct_column_data.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/table/update_segment.hpp +0 -2
- package/src/duckdb/src/include/duckdb/storage/table/validity_column_data.hpp +1 -2
- package/src/duckdb/src/include/duckdb/transaction/local_storage.hpp +9 -34
- package/src/duckdb/src/include/duckdb/verification/deserialized_statement_verifier_v2.hpp +26 -0
- package/src/duckdb/src/include/duckdb/verification/no_operator_caching_verifier.hpp +25 -0
- package/src/duckdb/src/include/duckdb/verification/statement_verifier.hpp +6 -0
- package/src/duckdb/src/main/client_context.cpp +1 -0
- package/src/duckdb/src/main/client_verify.cpp +5 -0
- package/src/duckdb/src/main/config.cpp +4 -0
- package/src/duckdb/src/main/database.cpp +22 -34
- package/src/duckdb/src/main/database_path_and_type.cpp +23 -0
- package/src/duckdb/src/main/extension/extension_load.cpp +19 -15
- package/src/duckdb/src/main/relation/join_relation.cpp +2 -1
- package/src/duckdb/src/main/relation/setop_relation.cpp +2 -3
- package/src/duckdb/src/parallel/event.cpp +1 -1
- package/src/duckdb/src/parallel/executor.cpp +39 -3
- package/src/duckdb/src/parallel/executor_task.cpp +11 -0
- package/src/duckdb/src/parallel/interrupt.cpp +57 -0
- package/src/duckdb/src/parallel/pipeline.cpp +49 -6
- package/src/duckdb/src/parallel/pipeline_executor.cpp +248 -69
- package/src/duckdb/src/parallel/pipeline_initialize_event.cpp +1 -1
- package/src/duckdb/src/parallel/task_scheduler.cpp +57 -22
- package/src/duckdb/src/parser/base_expression.cpp +6 -0
- package/src/duckdb/src/parser/expression/window_expression.cpp +1 -1
- package/src/duckdb/src/parser/parsed_data/sample_options.cpp +2 -2
- package/src/duckdb/src/parser/query_node/select_node.cpp +1 -1
- package/src/duckdb/src/parser/result_modifier.cpp +2 -2
- package/src/duckdb/src/parser/statement/select_statement.cpp +0 -44
- package/src/duckdb/src/parser/tableref/joinref.cpp +3 -3
- package/src/duckdb/src/parser/tableref.cpp +1 -1
- package/src/duckdb/src/parser/transform/expression/transform_function.cpp +3 -3
- package/src/duckdb/src/planner/binder/expression/bind_columnref_expression.cpp +6 -0
- package/src/duckdb/src/planner/binder/expression/bind_function_expression.cpp +4 -1
- package/src/duckdb/src/planner/expression/bound_columnref_expression.cpp +17 -3
- package/src/duckdb/src/planner/expression/bound_reference_expression.cpp +8 -2
- package/src/duckdb/src/planner/expression_binder/base_select_binder.cpp +7 -0
- package/src/duckdb/src/planner/operator/logical_aggregate.cpp +14 -2
- package/src/duckdb/src/planner/operator/logical_column_data_get.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_comparison_join.cpp +2 -2
- package/src/duckdb/src/planner/operator/logical_cteref.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_delete.cpp +10 -0
- package/src/duckdb/src/planner/operator/logical_delim_get.cpp +12 -1
- package/src/duckdb/src/planner/operator/logical_dummy_scan.cpp +12 -1
- package/src/duckdb/src/planner/operator/logical_expression_get.cpp +12 -1
- package/src/duckdb/src/planner/operator/logical_get.cpp +10 -4
- package/src/duckdb/src/planner/operator/logical_insert.cpp +12 -1
- package/src/duckdb/src/planner/operator/logical_pivot.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_projection.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_recursive_cte.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_set_operation.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_unnest.cpp +12 -1
- package/src/duckdb/src/planner/operator/logical_update.cpp +10 -0
- package/src/duckdb/src/planner/operator/logical_window.cpp +11 -0
- package/src/duckdb/src/storage/checkpoint_manager.cpp +1 -1
- package/src/duckdb/src/storage/data_table.cpp +5 -0
- package/src/duckdb/src/storage/local_storage.cpp +40 -110
- package/src/duckdb/src/storage/optimistic_data_writer.cpp +96 -0
- package/src/duckdb/src/storage/partial_block_manager.cpp +73 -9
- package/src/duckdb/src/storage/single_file_block_manager.cpp +3 -1
- package/src/duckdb/src/storage/standard_buffer_manager.cpp +17 -12
- package/src/duckdb/src/storage/statistics/base_statistics.cpp +3 -0
- package/src/duckdb/src/storage/table/column_checkpoint_state.cpp +90 -82
- package/src/duckdb/src/storage/table/column_data.cpp +19 -45
- package/src/duckdb/src/storage/table/column_data_checkpointer.cpp +7 -7
- package/src/duckdb/src/storage/table/column_segment.cpp +1 -1
- package/src/duckdb/src/storage/table/list_column_data.cpp +6 -11
- package/src/duckdb/src/storage/table/row_group.cpp +13 -14
- package/src/duckdb/src/storage/table/row_group_collection.cpp +10 -4
- package/src/duckdb/src/storage/table/standard_column_data.cpp +6 -10
- package/src/duckdb/src/storage/table/struct_column_data.cpp +7 -13
- package/src/duckdb/src/storage/table/update_segment.cpp +0 -25
- package/src/duckdb/src/storage/table/validity_column_data.cpp +2 -6
- package/src/duckdb/src/transaction/commit_state.cpp +4 -4
- package/src/duckdb/src/verification/deserialized_statement_verifier.cpp +2 -1
- package/src/duckdb/src/verification/deserialized_statement_verifier_v2.cpp +20 -0
- package/src/duckdb/src/verification/no_operator_caching_verifier.cpp +13 -0
- package/src/duckdb/src/verification/statement_verifier.cpp +7 -0
- package/src/duckdb/ub_src_common.cpp +2 -2
- package/src/duckdb/ub_src_common_serializer.cpp +4 -2
- package/src/duckdb/ub_src_core_functions_scalar_string.cpp +2 -0
- package/src/duckdb/ub_src_execution_operator_persistent.cpp +2 -0
- package/src/duckdb/ub_src_main.cpp +2 -0
- package/src/duckdb/ub_src_parallel.cpp +2 -0
- package/src/duckdb/ub_src_storage.cpp +2 -0
- package/src/duckdb/src/common/serializer/enum_serializer.cpp +0 -1180
- package/src/duckdb/src/common/vector.cpp +0 -12
- package/src/duckdb/src/include/duckdb/common/serializer/enum_serializer.hpp +0 -113
@@ -46,47 +46,3 @@ string SelectStatement::ToString() const {
|
|
46
46
|
}
|
47
47
|
|
48
48
|
} // namespace duckdb
|
49
|
-
|
50
|
-
/*
|
51
|
-
json_serialize_sql('SELECT BLOB ''\x01\x10'';', format := CAST('t' AS BOOLEAN)){
|
52
|
-
"error": false,
|
53
|
-
"statements": [
|
54
|
-
{
|
55
|
-
"node": {
|
56
|
-
"type": "SELECT_NODE",
|
57
|
-
"modifiers": [],
|
58
|
-
"cte_map": {
|
59
|
-
"map": []
|
60
|
-
},
|
61
|
-
"select_list": [
|
62
|
-
{
|
63
|
-
"class": "CONSTANT",
|
64
|
-
"type": "CONSTANT",
|
65
|
-
"alias": "",
|
66
|
-
"value": {
|
67
|
-
"type": {
|
68
|
-
"id": "BLOB",
|
69
|
-
"type_info": null
|
70
|
-
},
|
71
|
-
"is_null": false,
|
72
|
-
"value": "\u0001\u0010"
|
73
|
-
}
|
74
|
-
}
|
75
|
-
],
|
76
|
-
"from_table": {
|
77
|
-
"type": "EMPTY",
|
78
|
-
"alias": "",
|
79
|
-
"sample": null
|
80
|
-
},
|
81
|
-
"where_clause": null,
|
82
|
-
"group_expressions": [],
|
83
|
-
"group_sets": [],
|
84
|
-
"aggregate_handling": "STANDARD_HANDLING",
|
85
|
-
"having": null,
|
86
|
-
"sample": null,
|
87
|
-
"qualify": null
|
88
|
-
}
|
89
|
-
}
|
90
|
-
]
|
91
|
-
}
|
92
|
-
*/
|
@@ -12,15 +12,15 @@ string JoinRef::ToString() const {
|
|
12
12
|
result = left->ToString() + " ";
|
13
13
|
switch (ref_type) {
|
14
14
|
case JoinRefType::REGULAR:
|
15
|
-
result +=
|
15
|
+
result += EnumUtil::ToString(type) + " JOIN ";
|
16
16
|
break;
|
17
17
|
case JoinRefType::NATURAL:
|
18
18
|
result += "NATURAL ";
|
19
|
-
result +=
|
19
|
+
result += EnumUtil::ToString(type) + " JOIN ";
|
20
20
|
break;
|
21
21
|
case JoinRefType::ASOF:
|
22
22
|
result += "ASOF ";
|
23
|
-
result +=
|
23
|
+
result += EnumUtil::ToString(type) + " JOIN ";
|
24
24
|
break;
|
25
25
|
case JoinRefType::CROSS:
|
26
26
|
result += ", ";
|
@@ -30,7 +30,7 @@ string TableRef::BaseToString(string result, const vector<string> &column_name_a
|
|
30
30
|
result += ")";
|
31
31
|
}
|
32
32
|
if (sample) {
|
33
|
-
result += " TABLESAMPLE " +
|
33
|
+
result += " TABLESAMPLE " + EnumUtil::ToString(sample->method);
|
34
34
|
result += "(" + sample->sample_size.ToString() + " " + string(sample->is_percentage ? "PERCENT" : "ROWS") + ")";
|
35
35
|
if (sample->seed >= 0) {
|
36
36
|
result += "REPEATABLE (" + to_string(sample->seed) + ")";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#include "duckdb/common/
|
1
|
+
#include "duckdb/common/enum_util.hpp"
|
2
2
|
#include "duckdb/common/string_util.hpp"
|
3
3
|
#include "duckdb/common/to_string.hpp"
|
4
4
|
#include "duckdb/parser/expression/case_expression.hpp"
|
@@ -305,8 +305,8 @@ unique_ptr<ParsedExpression> Transformer::TransformFuncCall(duckdb_libpgquery::P
|
|
305
305
|
auto arg_expr = children[0].get();
|
306
306
|
auto &order_by = order_bys->orders[0];
|
307
307
|
if (arg_expr->Equals(order_by.expression.get())) {
|
308
|
-
auto sense = make_uniq<ConstantExpression>(
|
309
|
-
auto nulls = make_uniq<ConstantExpression>(
|
308
|
+
auto sense = make_uniq<ConstantExpression>(EnumUtil::ToChars(order_by.type));
|
309
|
+
auto nulls = make_uniq<ConstantExpression>(EnumUtil::ToChars(order_by.null_order));
|
310
310
|
order_bys = nullptr;
|
311
311
|
auto unordered = make_uniq<FunctionExpression>(catalog, schema, lowercase_name.c_str(), std::move(children),
|
312
312
|
std::move(filter_expr), std::move(order_bys),
|
@@ -388,4 +388,10 @@ BindResult ExpressionBinder::BindExpression(ColumnRefExpression &colref_p, idx_t
|
|
388
388
|
return result;
|
389
389
|
}
|
390
390
|
|
391
|
+
bool ExpressionBinder::QualifyColumnAlias(const ColumnRefExpression &colref) {
|
392
|
+
// Only BaseSelectBinder will have a valid col alias map,
|
393
|
+
// otherwise just return false
|
394
|
+
return false;
|
395
|
+
}
|
396
|
+
|
391
397
|
} // namespace duckdb
|
@@ -45,7 +45,10 @@ BindResult ExpressionBinder::BindExpression(FunctionExpression &function, idx_t
|
|
45
45
|
colref = make_uniq<ColumnRefExpression>(function.schema, function.catalog);
|
46
46
|
}
|
47
47
|
auto new_colref = QualifyColumnName(*colref, error);
|
48
|
-
|
48
|
+
bool is_col = error.empty() ? true : false;
|
49
|
+
bool is_col_alias = QualifyColumnAlias(*colref);
|
50
|
+
|
51
|
+
if (is_col || is_col_alias) {
|
49
52
|
// we can! transform this into a function call on the column
|
50
53
|
// i.e. "x.lower()" becomes "lower(x)"
|
51
54
|
function.children.insert(function.children.begin(), std::move(colref));
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#include "duckdb/planner/expression/bound_columnref_expression.hpp"
|
2
2
|
|
3
|
-
#include "duckdb/common/types/hash.hpp"
|
4
|
-
#include "duckdb/common/to_string.hpp"
|
5
3
|
#include "duckdb/common/field_writer.hpp"
|
4
|
+
#include "duckdb/common/types/hash.hpp"
|
5
|
+
#include "duckdb/main/config.hpp"
|
6
6
|
|
7
7
|
namespace duckdb {
|
8
8
|
|
@@ -35,11 +35,25 @@ bool BoundColumnRefExpression::Equals(const BaseExpression *other_p) const {
|
|
35
35
|
return other.binding == binding && other.depth == depth;
|
36
36
|
}
|
37
37
|
|
38
|
+
string BoundColumnRefExpression::GetName() const {
|
39
|
+
#ifdef DEBUG
|
40
|
+
if (DBConfigOptions::debug_print_bindings) {
|
41
|
+
return binding.ToString();
|
42
|
+
}
|
43
|
+
#endif
|
44
|
+
return Expression::GetName();
|
45
|
+
}
|
46
|
+
|
38
47
|
string BoundColumnRefExpression::ToString() const {
|
48
|
+
#ifdef DEBUG
|
49
|
+
if (DBConfigOptions::debug_print_bindings) {
|
50
|
+
return binding.ToString();
|
51
|
+
}
|
52
|
+
#endif
|
39
53
|
if (!alias.empty()) {
|
40
54
|
return alias;
|
41
55
|
}
|
42
|
-
return
|
56
|
+
return binding.ToString();
|
43
57
|
}
|
44
58
|
|
45
59
|
void BoundColumnRefExpression::Serialize(FieldWriter &writer) const {
|
@@ -1,9 +1,10 @@
|
|
1
1
|
#include "duckdb/planner/expression/bound_reference_expression.hpp"
|
2
2
|
|
3
|
+
#include "duckdb/common/field_writer.hpp"
|
3
4
|
#include "duckdb/common/serializer.hpp"
|
4
|
-
#include "duckdb/common/types/hash.hpp"
|
5
5
|
#include "duckdb/common/to_string.hpp"
|
6
|
-
#include "duckdb/common/
|
6
|
+
#include "duckdb/common/types/hash.hpp"
|
7
|
+
#include "duckdb/main/config.hpp"
|
7
8
|
|
8
9
|
namespace duckdb {
|
9
10
|
|
@@ -16,6 +17,11 @@ BoundReferenceExpression::BoundReferenceExpression(LogicalType type, idx_t index
|
|
16
17
|
}
|
17
18
|
|
18
19
|
string BoundReferenceExpression::ToString() const {
|
20
|
+
#ifdef DEBUG
|
21
|
+
if (DBConfigOptions::debug_print_bindings) {
|
22
|
+
return "#" + to_string(index);
|
23
|
+
}
|
24
|
+
#endif
|
19
25
|
if (!alias.empty()) {
|
20
26
|
return alias;
|
21
27
|
}
|
@@ -143,4 +143,11 @@ BindResult BaseSelectBinder::BindGroup(ParsedExpression &expr, idx_t depth, idx_
|
|
143
143
|
ColumnBinding(node.group_index, group_index), depth));
|
144
144
|
}
|
145
145
|
|
146
|
+
bool BaseSelectBinder::QualifyColumnAlias(const ColumnRefExpression &colref) {
|
147
|
+
if (!colref.IsQualified()) {
|
148
|
+
return alias_map.find(colref.column_names[0]) != alias_map.end() ? true : false;
|
149
|
+
}
|
150
|
+
return false;
|
151
|
+
}
|
152
|
+
|
146
153
|
} // namespace duckdb
|
@@ -1,6 +1,8 @@
|
|
1
1
|
#include "duckdb/planner/operator/logical_aggregate.hpp"
|
2
|
-
|
2
|
+
|
3
3
|
#include "duckdb/common/field_writer.hpp"
|
4
|
+
#include "duckdb/common/string_util.hpp"
|
5
|
+
#include "duckdb/main/config.hpp"
|
4
6
|
|
5
7
|
namespace duckdb {
|
6
8
|
|
@@ -87,7 +89,7 @@ unique_ptr<LogicalOperator> LogicalAggregate::Deserialize(LogicalDeserialization
|
|
87
89
|
for (idx_t i = 0; i < grouping_sets_size; i++) {
|
88
90
|
grouping_sets.push_back(reader.ReadRequiredSet<idx_t>());
|
89
91
|
}
|
90
|
-
vector<
|
92
|
+
vector<unsafe_vector<idx_t>> grouping_functions;
|
91
93
|
auto grouping_functions_size = reader.ReadRequired<idx_t>();
|
92
94
|
for (idx_t i = 0; i < grouping_functions_size; i++) {
|
93
95
|
grouping_functions.push_back(reader.ReadRequiredList<idx_t>());
|
@@ -117,4 +119,14 @@ vector<idx_t> LogicalAggregate::GetTableIndex() const {
|
|
117
119
|
return result;
|
118
120
|
}
|
119
121
|
|
122
|
+
string LogicalAggregate::GetName() const {
|
123
|
+
#ifdef DEBUG
|
124
|
+
if (DBConfigOptions::debug_print_bindings) {
|
125
|
+
return LogicalOperator::GetName() +
|
126
|
+
StringUtil::Format(" #%llu, #%llu, #%llu", group_index, aggregate_index, groupings_index);
|
127
|
+
}
|
128
|
+
#endif
|
129
|
+
return LogicalOperator::GetName();
|
130
|
+
}
|
131
|
+
|
120
132
|
} // namespace duckdb
|
@@ -1,6 +1,8 @@
|
|
1
1
|
#include "duckdb/planner/operator/logical_column_data_get.hpp"
|
2
|
+
|
2
3
|
#include "duckdb/common/field_writer.hpp"
|
3
4
|
#include "duckdb/common/types/data_chunk.hpp"
|
5
|
+
#include "duckdb/main/config.hpp"
|
4
6
|
|
5
7
|
namespace duckdb {
|
6
8
|
|
@@ -42,4 +44,13 @@ vector<idx_t> LogicalColumnDataGet::GetTableIndex() const {
|
|
42
44
|
return vector<idx_t> {table_index};
|
43
45
|
}
|
44
46
|
|
47
|
+
string LogicalColumnDataGet::GetName() const {
|
48
|
+
#ifdef DEBUG
|
49
|
+
if (DBConfigOptions::debug_print_bindings) {
|
50
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
|
51
|
+
}
|
52
|
+
#endif
|
53
|
+
return LogicalOperator::GetName();
|
54
|
+
}
|
55
|
+
|
45
56
|
} // namespace duckdb
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#include "duckdb/common/string_util.hpp"
|
3
3
|
#include "duckdb/planner/operator/logical_comparison_join.hpp"
|
4
4
|
#include "duckdb/planner/expression/bound_comparison_expression.hpp"
|
5
|
-
|
5
|
+
#include "duckdb/common/enum_util.hpp"
|
6
6
|
namespace duckdb {
|
7
7
|
|
8
8
|
LogicalComparisonJoin::LogicalComparisonJoin(JoinType join_type, LogicalOperatorType logical_type)
|
@@ -10,7 +10,7 @@ LogicalComparisonJoin::LogicalComparisonJoin(JoinType join_type, LogicalOperator
|
|
10
10
|
}
|
11
11
|
|
12
12
|
string LogicalComparisonJoin::ParamsToString() const {
|
13
|
-
string result =
|
13
|
+
string result = EnumUtil::ToChars(join_type);
|
14
14
|
for (auto &condition : conditions) {
|
15
15
|
result += "\n";
|
16
16
|
auto expr =
|
@@ -1,5 +1,7 @@
|
|
1
1
|
#include "duckdb/planner/operator/logical_cteref.hpp"
|
2
|
+
|
2
3
|
#include "duckdb/common/field_writer.hpp"
|
4
|
+
#include "duckdb/main/config.hpp"
|
3
5
|
|
4
6
|
namespace duckdb {
|
5
7
|
|
@@ -22,4 +24,13 @@ vector<idx_t> LogicalCTERef::GetTableIndex() const {
|
|
22
24
|
return vector<idx_t> {table_index};
|
23
25
|
}
|
24
26
|
|
27
|
+
string LogicalCTERef::GetName() const {
|
28
|
+
#ifdef DEBUG
|
29
|
+
if (DBConfigOptions::debug_print_bindings) {
|
30
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
|
31
|
+
}
|
32
|
+
#endif
|
33
|
+
return LogicalOperator::GetName();
|
34
|
+
}
|
35
|
+
|
25
36
|
} // namespace duckdb
|
@@ -1,6 +1,7 @@
|
|
1
1
|
#include "duckdb/planner/operator/logical_delete.hpp"
|
2
2
|
|
3
3
|
#include "duckdb/catalog/catalog_entry/table_catalog_entry.hpp"
|
4
|
+
#include "duckdb/main/config.hpp"
|
4
5
|
#include "duckdb/parser/parsed_data/create_table_info.hpp"
|
5
6
|
|
6
7
|
namespace duckdb {
|
@@ -51,4 +52,13 @@ void LogicalDelete::ResolveTypes() {
|
|
51
52
|
}
|
52
53
|
}
|
53
54
|
|
55
|
+
string LogicalDelete::GetName() const {
|
56
|
+
#ifdef DEBUG
|
57
|
+
if (DBConfigOptions::debug_print_bindings) {
|
58
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
|
59
|
+
}
|
60
|
+
#endif
|
61
|
+
return LogicalOperator::GetName();
|
62
|
+
}
|
63
|
+
|
54
64
|
} // namespace duckdb
|
@@ -1,6 +1,8 @@
|
|
1
|
-
#include "duckdb/common/field_writer.hpp"
|
2
1
|
#include "duckdb/planner/operator/logical_delim_get.hpp"
|
3
2
|
|
3
|
+
#include "duckdb/common/field_writer.hpp"
|
4
|
+
#include "duckdb/main/config.hpp"
|
5
|
+
|
4
6
|
namespace duckdb {
|
5
7
|
|
6
8
|
void LogicalDelimGet::Serialize(FieldWriter &writer) const {
|
@@ -18,4 +20,13 @@ vector<idx_t> LogicalDelimGet::GetTableIndex() const {
|
|
18
20
|
return vector<idx_t> {table_index};
|
19
21
|
}
|
20
22
|
|
23
|
+
string LogicalDelimGet::GetName() const {
|
24
|
+
#ifdef DEBUG
|
25
|
+
if (DBConfigOptions::debug_print_bindings) {
|
26
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
|
27
|
+
}
|
28
|
+
#endif
|
29
|
+
return LogicalOperator::GetName();
|
30
|
+
}
|
31
|
+
|
21
32
|
} // namespace duckdb
|
@@ -1,6 +1,8 @@
|
|
1
|
-
#include "duckdb/common/field_writer.hpp"
|
2
1
|
#include "duckdb/planner/operator/logical_dummy_scan.hpp"
|
3
2
|
|
3
|
+
#include "duckdb/common/field_writer.hpp"
|
4
|
+
#include "duckdb/main/config.hpp"
|
5
|
+
|
4
6
|
namespace duckdb {
|
5
7
|
|
6
8
|
void LogicalDummyScan::Serialize(FieldWriter &writer) const {
|
@@ -16,4 +18,13 @@ vector<idx_t> LogicalDummyScan::GetTableIndex() const {
|
|
16
18
|
return vector<idx_t> {table_index};
|
17
19
|
}
|
18
20
|
|
21
|
+
string LogicalDummyScan::GetName() const {
|
22
|
+
#ifdef DEBUG
|
23
|
+
if (DBConfigOptions::debug_print_bindings) {
|
24
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
|
25
|
+
}
|
26
|
+
#endif
|
27
|
+
return LogicalOperator::GetName();
|
28
|
+
}
|
29
|
+
|
19
30
|
} // namespace duckdb
|
@@ -1,6 +1,8 @@
|
|
1
|
-
#include "duckdb/common/field_writer.hpp"
|
2
1
|
#include "duckdb/planner/operator/logical_expression_get.hpp"
|
3
2
|
|
3
|
+
#include "duckdb/common/field_writer.hpp"
|
4
|
+
#include "duckdb/main/config.hpp"
|
5
|
+
|
4
6
|
namespace duckdb {
|
5
7
|
|
6
8
|
void LogicalExpressionGet::Serialize(FieldWriter &writer) const {
|
@@ -30,4 +32,13 @@ vector<idx_t> LogicalExpressionGet::GetTableIndex() const {
|
|
30
32
|
return vector<idx_t> {table_index};
|
31
33
|
}
|
32
34
|
|
35
|
+
string LogicalExpressionGet::GetName() const {
|
36
|
+
#ifdef DEBUG
|
37
|
+
if (DBConfigOptions::debug_print_bindings) {
|
38
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
|
39
|
+
}
|
40
|
+
#endif
|
41
|
+
return LogicalOperator::GetName();
|
42
|
+
}
|
43
|
+
|
33
44
|
} // namespace duckdb
|
@@ -6,6 +6,7 @@
|
|
6
6
|
#include "duckdb/common/string_util.hpp"
|
7
7
|
#include "duckdb/function/function_serialization.hpp"
|
8
8
|
#include "duckdb/function/table/table_scan.hpp"
|
9
|
+
#include "duckdb/main/config.hpp"
|
9
10
|
#include "duckdb/storage/data_table.hpp"
|
10
11
|
|
11
12
|
namespace duckdb {
|
@@ -16,10 +17,6 @@ LogicalGet::LogicalGet(idx_t table_index, TableFunction function, unique_ptr<Fun
|
|
16
17
|
bind_data(std::move(bind_data)), returned_types(std::move(returned_types)), names(std::move(returned_names)) {
|
17
18
|
}
|
18
19
|
|
19
|
-
string LogicalGet::GetName() const {
|
20
|
-
return StringUtil::Upper(function.name);
|
21
|
-
}
|
22
|
-
|
23
20
|
optional_ptr<TableCatalogEntry> LogicalGet::GetTable() const {
|
24
21
|
return TableScanFunction::GetTableEntry(function, bind_data.get());
|
25
22
|
}
|
@@ -201,4 +198,13 @@ vector<idx_t> LogicalGet::GetTableIndex() const {
|
|
201
198
|
return vector<idx_t> {table_index};
|
202
199
|
}
|
203
200
|
|
201
|
+
string LogicalGet::GetName() const {
|
202
|
+
#ifdef DEBUG
|
203
|
+
if (DBConfigOptions::debug_print_bindings) {
|
204
|
+
return StringUtil::Upper(function.name) + StringUtil::Format(" #%llu", table_index);
|
205
|
+
}
|
206
|
+
#endif
|
207
|
+
return StringUtil::Upper(function.name);
|
208
|
+
}
|
209
|
+
|
204
210
|
} // namespace duckdb
|
@@ -1,6 +1,8 @@
|
|
1
|
+
#include "duckdb/planner/operator/logical_insert.hpp"
|
2
|
+
|
1
3
|
#include "duckdb/catalog/catalog_entry/table_catalog_entry.hpp"
|
2
4
|
#include "duckdb/common/field_writer.hpp"
|
3
|
-
#include "duckdb/
|
5
|
+
#include "duckdb/main/config.hpp"
|
4
6
|
#include "duckdb/parser/parsed_data/create_table_info.hpp"
|
5
7
|
|
6
8
|
namespace duckdb {
|
@@ -78,4 +80,13 @@ void LogicalInsert::ResolveTypes() {
|
|
78
80
|
}
|
79
81
|
}
|
80
82
|
|
83
|
+
string LogicalInsert::GetName() const {
|
84
|
+
#ifdef DEBUG
|
85
|
+
if (DBConfigOptions::debug_print_bindings) {
|
86
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
|
87
|
+
}
|
88
|
+
#endif
|
89
|
+
return LogicalOperator::GetName();
|
90
|
+
}
|
91
|
+
|
81
92
|
} // namespace duckdb
|
@@ -1,5 +1,7 @@
|
|
1
1
|
#include "duckdb/planner/operator/logical_pivot.hpp"
|
2
2
|
|
3
|
+
#include "duckdb/main/config.hpp"
|
4
|
+
|
3
5
|
namespace duckdb {
|
4
6
|
|
5
7
|
LogicalPivot::LogicalPivot(idx_t pivot_idx, unique_ptr<LogicalOperator> plan, BoundPivotInfo info_p)
|
@@ -32,4 +34,13 @@ void LogicalPivot::ResolveTypes() {
|
|
32
34
|
this->types = bound_pivot.types;
|
33
35
|
}
|
34
36
|
|
37
|
+
string LogicalPivot::GetName() const {
|
38
|
+
#ifdef DEBUG
|
39
|
+
if (DBConfigOptions::debug_print_bindings) {
|
40
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", pivot_index);
|
41
|
+
}
|
42
|
+
#endif
|
43
|
+
return LogicalOperator::GetName();
|
44
|
+
}
|
45
|
+
|
35
46
|
} // namespace duckdb
|
@@ -1,5 +1,7 @@
|
|
1
1
|
#include "duckdb/planner/operator/logical_projection.hpp"
|
2
|
+
|
2
3
|
#include "duckdb/common/field_writer.hpp"
|
4
|
+
#include "duckdb/main/config.hpp"
|
3
5
|
|
4
6
|
namespace duckdb {
|
5
7
|
|
@@ -32,4 +34,13 @@ vector<idx_t> LogicalProjection::GetTableIndex() const {
|
|
32
34
|
return vector<idx_t> {table_index};
|
33
35
|
}
|
34
36
|
|
37
|
+
string LogicalProjection::GetName() const {
|
38
|
+
#ifdef DEBUG
|
39
|
+
if (DBConfigOptions::debug_print_bindings) {
|
40
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
|
41
|
+
}
|
42
|
+
#endif
|
43
|
+
return LogicalOperator::GetName();
|
44
|
+
}
|
45
|
+
|
35
46
|
} // namespace duckdb
|
@@ -1,5 +1,7 @@
|
|
1
1
|
#include "duckdb/planner/operator/logical_recursive_cte.hpp"
|
2
|
+
|
2
3
|
#include "duckdb/common/field_writer.hpp"
|
4
|
+
#include "duckdb/main/config.hpp"
|
3
5
|
|
4
6
|
namespace duckdb {
|
5
7
|
|
@@ -21,4 +23,13 @@ vector<idx_t> LogicalRecursiveCTE::GetTableIndex() const {
|
|
21
23
|
return vector<idx_t> {table_index};
|
22
24
|
}
|
23
25
|
|
26
|
+
string LogicalRecursiveCTE::GetName() const {
|
27
|
+
#ifdef DEBUG
|
28
|
+
if (DBConfigOptions::debug_print_bindings) {
|
29
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
|
30
|
+
}
|
31
|
+
#endif
|
32
|
+
return LogicalOperator::GetName();
|
33
|
+
}
|
34
|
+
|
24
35
|
} // namespace duckdb
|
@@ -1,5 +1,7 @@
|
|
1
1
|
#include "duckdb/planner/operator/logical_set_operation.hpp"
|
2
|
+
|
2
3
|
#include "duckdb/common/field_writer.hpp"
|
4
|
+
#include "duckdb/main/config.hpp"
|
3
5
|
|
4
6
|
namespace duckdb {
|
5
7
|
|
@@ -19,4 +21,13 @@ vector<idx_t> LogicalSetOperation::GetTableIndex() const {
|
|
19
21
|
return vector<idx_t> {table_index};
|
20
22
|
}
|
21
23
|
|
24
|
+
string LogicalSetOperation::GetName() const {
|
25
|
+
#ifdef DEBUG
|
26
|
+
if (DBConfigOptions::debug_print_bindings) {
|
27
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
|
28
|
+
}
|
29
|
+
#endif
|
30
|
+
return LogicalOperator::GetName();
|
31
|
+
}
|
32
|
+
|
22
33
|
} // namespace duckdb
|
@@ -1,6 +1,8 @@
|
|
1
|
-
#include "duckdb/common/field_writer.hpp"
|
2
1
|
#include "duckdb/planner/operator/logical_unnest.hpp"
|
3
2
|
|
3
|
+
#include "duckdb/common/field_writer.hpp"
|
4
|
+
#include "duckdb/main/config.hpp"
|
5
|
+
|
4
6
|
namespace duckdb {
|
5
7
|
|
6
8
|
vector<ColumnBinding> LogicalUnnest::GetColumnBindings() {
|
@@ -35,4 +37,13 @@ vector<idx_t> LogicalUnnest::GetTableIndex() const {
|
|
35
37
|
return vector<idx_t> {unnest_index};
|
36
38
|
}
|
37
39
|
|
40
|
+
string LogicalUnnest::GetName() const {
|
41
|
+
#ifdef DEBUG
|
42
|
+
if (DBConfigOptions::debug_print_bindings) {
|
43
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", unnest_index);
|
44
|
+
}
|
45
|
+
#endif
|
46
|
+
return LogicalOperator::GetName();
|
47
|
+
}
|
48
|
+
|
38
49
|
} // namespace duckdb
|
@@ -2,6 +2,7 @@
|
|
2
2
|
#include "duckdb/common/field_writer.hpp"
|
3
3
|
#include "duckdb/catalog/catalog_entry/table_catalog_entry.hpp"
|
4
4
|
#include "duckdb/parser/parsed_data/create_table_info.hpp"
|
5
|
+
#include "duckdb/main/config.hpp"
|
5
6
|
|
6
7
|
namespace duckdb {
|
7
8
|
|
@@ -52,4 +53,13 @@ void LogicalUpdate::ResolveTypes() {
|
|
52
53
|
}
|
53
54
|
}
|
54
55
|
|
56
|
+
string LogicalUpdate::GetName() const {
|
57
|
+
#ifdef DEBUG
|
58
|
+
if (DBConfigOptions::debug_print_bindings) {
|
59
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index);
|
60
|
+
}
|
61
|
+
#endif
|
62
|
+
return LogicalOperator::GetName();
|
63
|
+
}
|
64
|
+
|
55
65
|
} // namespace duckdb
|
@@ -1,5 +1,7 @@
|
|
1
1
|
#include "duckdb/planner/operator/logical_window.hpp"
|
2
|
+
|
2
3
|
#include "duckdb/common/field_writer.hpp"
|
4
|
+
#include "duckdb/main/config.hpp"
|
3
5
|
|
4
6
|
namespace duckdb {
|
5
7
|
|
@@ -34,4 +36,13 @@ vector<idx_t> LogicalWindow::GetTableIndex() const {
|
|
34
36
|
return vector<idx_t> {window_index};
|
35
37
|
}
|
36
38
|
|
39
|
+
string LogicalWindow::GetName() const {
|
40
|
+
#ifdef DEBUG
|
41
|
+
if (DBConfigOptions::debug_print_bindings) {
|
42
|
+
return LogicalOperator::GetName() + StringUtil::Format(" #%llu", window_index);
|
43
|
+
}
|
44
|
+
#endif
|
45
|
+
return LogicalOperator::GetName();
|
46
|
+
}
|
47
|
+
|
37
48
|
} // namespace duckdb
|
@@ -37,7 +37,7 @@ namespace duckdb {
|
|
37
37
|
void ReorderTableEntries(vector<reference<TableCatalogEntry>> &tables);
|
38
38
|
|
39
39
|
SingleFileCheckpointWriter::SingleFileCheckpointWriter(AttachedDatabase &db, BlockManager &block_manager)
|
40
|
-
: CheckpointWriter(db), partial_block_manager(block_manager) {
|
40
|
+
: CheckpointWriter(db), partial_block_manager(block_manager, CheckpointType::FULL_CHECKPOINT) {
|
41
41
|
}
|
42
42
|
|
43
43
|
BlockManager &SingleFileCheckpointWriter::GetBlockManager() {
|
@@ -665,6 +665,11 @@ OptimisticDataWriter &DataTable::CreateOptimisticWriter(ClientContext &context)
|
|
665
665
|
return local_storage.CreateOptimisticWriter(*this);
|
666
666
|
}
|
667
667
|
|
668
|
+
void DataTable::FinalizeOptimisticWriter(ClientContext &context, OptimisticDataWriter &writer) {
|
669
|
+
auto &local_storage = LocalStorage::Get(context, db);
|
670
|
+
local_storage.FinalizeOptimisticWriter(*this, writer);
|
671
|
+
}
|
672
|
+
|
668
673
|
void DataTable::LocalMerge(ClientContext &context, RowGroupCollection &collection) {
|
669
674
|
auto &local_storage = LocalStorage::Get(context, db);
|
670
675
|
local_storage.LocalMerge(*this, collection);
|