duckdb 0.10.2-dev0.0 → 0.10.2-dev5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/binding.gyp +22 -18
- package/binding.gyp.in +3 -0
- package/package.json +1 -1
- package/src/duckdb/extension/icu/icu-timezone.cpp +3 -1
- package/src/duckdb/extension/icu/icu_extension.cpp +6 -2
- package/src/duckdb/extension/json/buffered_json_reader.cpp +10 -3
- package/src/duckdb/extension/json/include/buffered_json_reader.hpp +2 -0
- package/src/duckdb/extension/json/include/json_scan.hpp +13 -7
- package/src/duckdb/extension/json/include/json_serializer.hpp +5 -4
- package/src/duckdb/extension/json/include/json_structure.hpp +3 -3
- package/src/duckdb/extension/json/json_functions/json_serialize_plan.cpp +15 -5
- package/src/duckdb/extension/json/json_functions/json_serialize_sql.cpp +15 -6
- package/src/duckdb/extension/json/json_functions/json_structure.cpp +21 -20
- package/src/duckdb/extension/json/json_functions/read_json.cpp +37 -3
- package/src/duckdb/extension/json/json_functions.cpp +7 -2
- package/src/duckdb/extension/json/json_scan.cpp +57 -33
- package/src/duckdb/extension/parquet/column_reader.cpp +12 -3
- package/src/duckdb/extension/parquet/column_writer.cpp +44 -7
- package/src/duckdb/extension/parquet/include/parquet_writer.hpp +5 -1
- package/src/duckdb/extension/parquet/parquet_extension.cpp +30 -3
- package/src/duckdb/extension/parquet/parquet_metadata.cpp +1 -1
- package/src/duckdb/extension/parquet/parquet_writer.cpp +4 -2
- package/src/duckdb/extension/parquet/zstd_file_system.cpp +1 -1
- package/src/duckdb/src/catalog/catalog.cpp +5 -1
- package/src/duckdb/src/catalog/catalog_entry/duck_schema_entry.cpp +21 -5
- package/src/duckdb/src/catalog/catalog_entry/duck_table_entry.cpp +8 -9
- package/src/duckdb/src/catalog/catalog_entry/index_catalog_entry.cpp +3 -7
- package/src/duckdb/src/catalog/catalog_entry/sequence_catalog_entry.cpp +1 -1
- package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +6 -7
- package/src/duckdb/src/catalog/catalog_entry.cpp +8 -0
- package/src/duckdb/src/catalog/catalog_search_path.cpp +5 -0
- package/src/duckdb/src/catalog/catalog_set.cpp +2 -2
- package/src/duckdb/src/catalog/default/default_functions.cpp +6 -6
- package/src/duckdb/src/catalog/default/default_schemas.cpp +1 -1
- package/src/duckdb/src/catalog/default/default_views.cpp +7 -7
- package/src/duckdb/src/catalog/dependency_catalog_set.cpp +2 -1
- package/src/duckdb/src/catalog/dependency_list.cpp +92 -8
- package/src/duckdb/src/catalog/dependency_manager.cpp +53 -68
- package/src/duckdb/src/catalog/duck_catalog.cpp +1 -1
- package/src/duckdb/src/common/adbc/adbc.cpp +287 -45
- package/src/duckdb/src/common/arrow/appender/union_data.cpp +2 -2
- package/src/duckdb/src/common/box_renderer.cpp +12 -12
- package/src/duckdb/src/common/crypto/md5.cpp +2 -1
- package/src/duckdb/src/common/enum_util.cpp +307 -1
- package/src/duckdb/src/common/enums/expression_type.cpp +4 -0
- package/src/duckdb/src/common/enums/optimizer_type.cpp +1 -1
- package/src/duckdb/src/common/file_system.cpp +60 -13
- package/src/duckdb/src/common/filename_pattern.cpp +13 -13
- package/src/duckdb/src/common/gzip_file_system.cpp +1 -1
- package/src/duckdb/src/common/http_state.cpp +1 -1
- package/src/duckdb/src/common/local_file_system.cpp +72 -71
- package/src/duckdb/src/common/multi_file_reader.cpp +48 -28
- package/src/duckdb/src/common/row_operations/row_matcher.cpp +2 -2
- package/src/duckdb/src/common/serializer/buffered_file_reader.cpp +13 -1
- package/src/duckdb/src/common/serializer/buffered_file_writer.cpp +32 -13
- package/src/duckdb/src/common/string_util.cpp +2 -3
- package/src/duckdb/src/common/tree_renderer.cpp +32 -67
- package/src/duckdb/src/common/types/bit.cpp +6 -6
- package/src/duckdb/src/common/types/data_chunk.cpp +2 -2
- package/src/duckdb/src/common/types/hash.cpp +6 -6
- package/src/duckdb/src/common/types/hyperloglog.cpp +2 -0
- package/src/duckdb/src/common/types/row/tuple_data_allocator.cpp +13 -0
- package/src/duckdb/src/common/types/row/tuple_data_layout.cpp +5 -7
- package/src/duckdb/src/common/types/uuid.cpp +1 -1
- package/src/duckdb/src/common/types/vector.cpp +22 -14
- package/src/duckdb/src/common/types.cpp +8 -1
- package/src/duckdb/src/common/vector_operations/comparison_operators.cpp +20 -18
- package/src/duckdb/src/common/vector_operations/generators.cpp +1 -1
- package/src/duckdb/src/common/vector_operations/is_distinct_from.cpp +267 -110
- package/src/duckdb/src/common/vector_operations/vector_hash.cpp +52 -23
- package/src/duckdb/src/common/virtual_file_system.cpp +33 -20
- package/src/duckdb/src/core_functions/aggregate/algebraic/avg.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/distributive/minmax.cpp +3 -3
- package/src/duckdb/src/core_functions/aggregate/distributive/sum.cpp +31 -16
- package/src/duckdb/src/core_functions/aggregate/holistic/quantile.cpp +3 -0
- package/src/duckdb/src/core_functions/aggregate/nested/list.cpp +2 -0
- package/src/duckdb/src/core_functions/core_functions.cpp +1 -1
- package/src/duckdb/src/core_functions/function_list.cpp +2 -2
- package/src/duckdb/src/core_functions/scalar/date/time_bucket.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/generic/system_functions.cpp +46 -17
- package/src/duckdb/src/core_functions/scalar/list/array_slice.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/list/flatten.cpp +82 -45
- package/src/duckdb/src/core_functions/scalar/list/list_aggregates.cpp +2 -2
- package/src/duckdb/src/core_functions/scalar/list/list_sort.cpp +3 -0
- package/src/duckdb/src/core_functions/scalar/math/numeric.cpp +3 -2
- package/src/duckdb/src/core_functions/scalar/string/hex.cpp +2 -4
- package/src/duckdb/src/core_functions/scalar/string/repeat.cpp +12 -21
- package/src/duckdb/src/execution/column_binding_resolver.cpp +2 -10
- package/src/duckdb/src/execution/expression_executor/execute_comparison.cpp +133 -66
- package/src/duckdb/src/execution/expression_executor/execute_function.cpp +0 -2
- package/src/duckdb/src/execution/expression_executor.cpp +0 -4
- package/src/duckdb/src/execution/expression_executor_state.cpp +1 -1
- package/src/duckdb/src/execution/index/art/art.cpp +2 -2
- package/src/duckdb/src/execution/index/unknown_index.cpp +13 -13
- package/src/duckdb/src/execution/join_hashtable.cpp +1 -1
- package/src/duckdb/src/execution/nested_loop_join/nested_loop_join_mark.cpp +0 -1
- package/src/duckdb/src/execution/operator/csv_scanner/buffer_manager/csv_buffer.cpp +10 -7
- package/src/duckdb/src/execution/operator/csv_scanner/buffer_manager/csv_buffer_manager.cpp +32 -1
- package/src/duckdb/src/execution/operator/csv_scanner/buffer_manager/csv_file_handle.cpp +16 -2
- package/src/duckdb/src/execution/operator/csv_scanner/scanner/scanner_boundary.cpp +7 -7
- package/src/duckdb/src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp +354 -159
- package/src/duckdb/src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp +11 -2
- package/src/duckdb/src/execution/operator/csv_scanner/sniffer/dialect_detection.cpp +22 -7
- package/src/duckdb/src/execution/operator/csv_scanner/sniffer/type_detection.cpp +1 -1
- package/src/duckdb/src/execution/operator/csv_scanner/state_machine/csv_state_machine_cache.cpp +10 -10
- package/src/duckdb/src/execution/operator/csv_scanner/table_function/csv_file_scanner.cpp +9 -18
- package/src/duckdb/src/execution/operator/csv_scanner/table_function/global_csv_state.cpp +180 -47
- package/src/duckdb/src/execution/operator/csv_scanner/util/csv_error.cpp +100 -58
- package/src/duckdb/src/execution/operator/csv_scanner/util/csv_reader_options.cpp +88 -21
- package/src/duckdb/src/execution/operator/helper/physical_vacuum.cpp +12 -13
- package/src/duckdb/src/execution/operator/join/physical_iejoin.cpp +2 -0
- package/src/duckdb/src/execution/operator/persistent/csv_rejects_table.cpp +118 -23
- package/src/duckdb/src/execution/operator/persistent/physical_batch_copy_to_file.cpp +2 -2
- package/src/duckdb/src/execution/operator/persistent/physical_batch_insert.cpp +14 -5
- package/src/duckdb/src/execution/operator/persistent/physical_copy_database.cpp +1 -1
- package/src/duckdb/src/execution/operator/persistent/physical_export.cpp +5 -5
- package/src/duckdb/src/execution/operator/schema/physical_attach.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan/plan_simple.cpp +0 -9
- package/src/duckdb/src/execution/physical_plan/plan_vacuum.cpp +18 -0
- package/src/duckdb/src/execution/physical_plan_generator.cpp +5 -3
- package/src/duckdb/src/execution/radix_partitioned_hashtable.cpp +81 -106
- package/src/duckdb/src/execution/reservoir_sample.cpp +1 -1
- package/src/duckdb/src/execution/window_executor.cpp +48 -28
- package/src/duckdb/src/execution/window_segment_tree.cpp +20 -23
- package/src/duckdb/src/function/aggregate/sorted_aggregate_function.cpp +1 -1
- package/src/duckdb/src/function/cast/enum_casts.cpp +20 -55
- package/src/duckdb/src/function/cast/vector_cast_helpers.cpp +10 -9
- package/src/duckdb/src/function/cast_rules.cpp +9 -1
- package/src/duckdb/src/function/compression_config.cpp +1 -1
- package/src/duckdb/src/function/function_binder.cpp +45 -44
- package/src/duckdb/src/function/function_set.cpp +9 -9
- package/src/duckdb/src/function/pragma/pragma_queries.cpp +1 -2
- package/src/duckdb/src/function/scalar/compressed_materialization/compress_integral.cpp +21 -5
- package/src/duckdb/src/function/scalar/compressed_materialization/compress_string.cpp +2 -2
- package/src/duckdb/src/function/scalar/list/list_select.cpp +5 -2
- package/src/duckdb/src/function/scalar/list/list_zip.cpp +5 -4
- package/src/duckdb/src/function/scalar/operators/arithmetic.cpp +60 -32
- package/src/duckdb/src/function/scalar/sequence/nextval.cpp +1 -1
- package/src/duckdb/src/function/scalar/strftime_format.cpp +31 -25
- package/src/duckdb/src/function/scalar/string/caseconvert.cpp +6 -6
- package/src/duckdb/src/function/scalar/string/length.cpp +23 -2
- package/src/duckdb/src/function/scalar/string/like.cpp +1 -1
- package/src/duckdb/src/function/scalar/string/regexp/regexp_extract_all.cpp +1 -1
- package/src/duckdb/src/function/scalar/system/aggregate_export.cpp +3 -3
- package/src/duckdb/src/function/table/arrow/arrow_array_scan_state.cpp +1 -1
- package/src/duckdb/src/function/table/arrow.cpp +7 -1
- package/src/duckdb/src/function/table/copy_csv.cpp +17 -13
- package/src/duckdb/src/function/table/read_csv.cpp +52 -39
- package/src/duckdb/src/function/table/sniff_csv.cpp +7 -13
- package/src/duckdb/src/function/table/system/duckdb_constraints.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_databases.cpp +7 -1
- package/src/duckdb/src/function/table/system/duckdb_extensions.cpp +12 -2
- package/src/duckdb/src/function/table/system/duckdb_sequences.cpp +1 -2
- package/src/duckdb/src/function/table/system/duckdb_tables.cpp +2 -2
- package/src/duckdb/src/function/table/system/pragma_metadata_info.cpp +9 -2
- package/src/duckdb/src/function/table/system/pragma_table_info.cpp +10 -6
- package/src/duckdb/src/function/table/table_scan.cpp +1 -4
- package/src/duckdb/src/function/table/version/pragma_version.cpp +3 -3
- package/src/duckdb/src/include/duckdb/catalog/catalog.hpp +6 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/duck_index_entry.hpp +1 -1
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/duck_schema_entry.hpp +1 -1
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/sequence_catalog_entry.hpp +1 -1
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry.hpp +6 -1
- package/src/duckdb/src/include/duckdb/catalog/catalog_set.hpp +3 -3
- package/src/duckdb/src/include/duckdb/catalog/default/default_functions.hpp +3 -3
- package/src/duckdb/src/include/duckdb/catalog/dependency.hpp +26 -4
- package/src/duckdb/src/include/duckdb/catalog/dependency_list.hpp +39 -6
- package/src/duckdb/src/include/duckdb/catalog/dependency_manager.hpp +19 -14
- package/src/duckdb/src/include/duckdb/catalog/duck_catalog.hpp +1 -1
- package/src/duckdb/src/include/duckdb/catalog/standard_entry.hpp +4 -0
- package/src/duckdb/src/include/duckdb/common/allocator.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/arrow/arrow_wrapper.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/bit_utils.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/box_renderer.hpp +16 -16
- package/src/duckdb/src/include/duckdb/common/crypto/md5.hpp +0 -1
- package/src/duckdb/src/include/duckdb/common/enum_util.hpp +32 -0
- package/src/duckdb/src/include/duckdb/common/enums/expression_type.hpp +4 -2
- package/src/duckdb/src/include/duckdb/common/exception/binder_exception.hpp +14 -10
- package/src/duckdb/src/include/duckdb/common/exception/catalog_exception.hpp +4 -4
- package/src/duckdb/src/include/duckdb/common/exception/conversion_exception.hpp +6 -6
- package/src/duckdb/src/include/duckdb/common/exception/http_exception.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/exception/parser_exception.hpp +4 -4
- package/src/duckdb/src/include/duckdb/common/exception/transaction_exception.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/exception.hpp +57 -58
- package/src/duckdb/src/include/duckdb/common/exception_format_value.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/extra_type_info.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/file_open_flags.hpp +134 -0
- package/src/duckdb/src/include/duckdb/common/file_opener.hpp +9 -6
- package/src/duckdb/src/include/duckdb/common/file_system.hpp +35 -36
- package/src/duckdb/src/include/duckdb/common/filename_pattern.hpp +4 -6
- package/src/duckdb/src/include/duckdb/common/fixed_size_map.hpp +13 -13
- package/src/duckdb/src/include/duckdb/common/helper.hpp +42 -47
- package/src/duckdb/src/include/duckdb/common/http_state.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/hugeint.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/index_vector.hpp +10 -10
- package/src/duckdb/src/include/duckdb/common/local_file_system.hpp +13 -10
- package/src/duckdb/src/include/duckdb/common/memory_safety.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/multi_file_reader_options.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/opener_file_system.hpp +50 -24
- package/src/duckdb/src/include/duckdb/common/operator/abs.hpp +12 -4
- package/src/duckdb/src/include/duckdb/common/optional_ptr.hpp +5 -5
- package/src/duckdb/src/include/duckdb/common/pipe_file_system.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/platform.h +1 -1
- package/src/duckdb/src/include/duckdb/common/printer.hpp +5 -5
- package/src/duckdb/src/include/duckdb/common/profiler.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/progress_bar/display/terminal_progress_bar_display.hpp +5 -5
- package/src/duckdb/src/include/duckdb/common/random_engine.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/re2_regex.hpp +7 -7
- package/src/duckdb/src/include/duckdb/common/serializer/buffered_file_reader.hpp +3 -0
- package/src/duckdb/src/include/duckdb/common/serializer/buffered_file_writer.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/serializer/deserialization_data.hpp +17 -6
- package/src/duckdb/src/include/duckdb/common/serializer/deserializer.hpp +12 -0
- package/src/duckdb/src/include/duckdb/common/serializer/serialization_traits.hpp +14 -0
- package/src/duckdb/src/include/duckdb/common/serializer/serializer.hpp +16 -0
- package/src/duckdb/src/include/duckdb/common/sort/duckdb_pdqsort.hpp +3 -0
- package/src/duckdb/src/include/duckdb/common/sort/partition_state.hpp +2 -0
- package/src/duckdb/src/include/duckdb/common/string_util.hpp +4 -4
- package/src/duckdb/src/include/duckdb/common/tree_renderer.hpp +24 -25
- package/src/duckdb/src/include/duckdb/common/typedefs.hpp +5 -5
- package/src/duckdb/src/include/duckdb/common/types/cast_helpers.hpp +1 -2
- package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp +10 -10
- package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection_iterators.hpp +5 -5
- package/src/duckdb/src/include/duckdb/common/types/column/partitioned_column_data.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/constraint_conflict_info.hpp +1 -2
- package/src/duckdb/src/include/duckdb/common/types/data_chunk.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/types/date.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/hash.hpp +5 -5
- package/src/duckdb/src/include/duckdb/common/types/hyperloglog.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/interval.hpp +4 -4
- package/src/duckdb/src/include/duckdb/common/types/row/partitioned_tuple_data.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_layout.hpp +10 -3
- package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_segment.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/selection_vector.hpp +12 -12
- package/src/duckdb/src/include/duckdb/common/types/string_heap.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/string_type.hpp +21 -20
- package/src/duckdb/src/include/duckdb/common/types/time.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/types/timestamp.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/types/uuid.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/types/value.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/types/vector.hpp +15 -7
- package/src/duckdb/src/include/duckdb/common/types/vector_buffer.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types.hpp +14 -10
- package/src/duckdb/src/include/duckdb/common/uhugeint.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/union_by_name.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/unique_ptr.hpp +15 -14
- package/src/duckdb/src/include/duckdb/common/vector.hpp +21 -21
- package/src/duckdb/src/include/duckdb/common/vector_operations/aggregate_executor.hpp +2 -0
- package/src/duckdb/src/include/duckdb/common/vector_operations/general_cast.hpp +2 -1
- package/src/duckdb/src/include/duckdb/common/vector_operations/generic_executor.hpp +2 -3
- package/src/duckdb/src/include/duckdb/common/vector_operations/unary_executor.hpp +3 -2
- package/src/duckdb/src/include/duckdb/common/vector_operations/vector_operations.hpp +50 -32
- package/src/duckdb/src/include/duckdb/common/virtual_file_system.hpp +10 -11
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/distributive_functions.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/sum_helpers.hpp +13 -1
- package/src/duckdb/src/include/duckdb/core_functions/function_list.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/lambda_functions.hpp +2 -1
- package/src/duckdb/src/include/duckdb/execution/aggregate_hashtable.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/column_binding_resolver.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/expression_executor.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/expression_executor_state.hpp +2 -5
- package/src/duckdb/src/include/duckdb/execution/merge_sort_tree.hpp +3 -3
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/aggregate_object.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/distinct_aggregate_data.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/base_scanner.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/column_count_scanner.hpp +0 -3
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_buffer.hpp +9 -6
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_buffer_manager.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_error.hpp +40 -22
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_file_handle.hpp +5 -0
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_file_scanner.hpp +1 -0
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_option.hpp +6 -4
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_reader_options.hpp +24 -10
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_state_machine.hpp +4 -0
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/global_csv_state.hpp +3 -1
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/skip_scanner.hpp +0 -3
- package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/string_value_scanner.hpp +58 -17
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_batch_collector.hpp +1 -1
- 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_prepare.hpp +3 -3
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_set.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_vacuum.hpp +4 -1
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/csv_rejects_table.hpp +16 -5
- package/src/duckdb/src/include/duckdb/execution/physical_operator_states.hpp +6 -6
- package/src/duckdb/src/include/duckdb/execution/physical_plan_generator.hpp +2 -1
- package/src/duckdb/src/include/duckdb/execution/window_executor.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/window_segment_tree.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/aggregate_function.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/cast/cast_function_set.hpp +5 -5
- package/src/duckdb/src/include/duckdb/function/cast/default_casts.hpp +4 -4
- package/src/duckdb/src/include/duckdb/function/cast/vector_cast_helpers.hpp +6 -6
- package/src/duckdb/src/include/duckdb/function/compression_function.hpp +4 -4
- package/src/duckdb/src/include/duckdb/function/copy_function.hpp +10 -13
- package/src/duckdb/src/include/duckdb/function/function.hpp +3 -3
- package/src/duckdb/src/include/duckdb/function/function_binder.hpp +24 -23
- package/src/duckdb/src/include/duckdb/function/function_serialization.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/function_set.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/pragma_function.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/scalar/regexp.hpp +3 -3
- package/src/duckdb/src/include/duckdb/function/scalar/strftime_format.hpp +7 -7
- package/src/duckdb/src/include/duckdb/function/scalar/string_functions.hpp +3 -3
- package/src/duckdb/src/include/duckdb/function/scalar_function.hpp +6 -6
- package/src/duckdb/src/include/duckdb/function/table/arrow/arrow_duck_schema.hpp +4 -4
- package/src/duckdb/src/include/duckdb/function/table/arrow.hpp +2 -2
- package/src/duckdb/src/include/duckdb/function/table/read_csv.hpp +1 -3
- package/src/duckdb/src/include/duckdb/function/table/table_scan.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/table_function.hpp +12 -11
- package/src/duckdb/src/include/duckdb/function/udf_function.hpp +66 -60
- package/src/duckdb/src/include/duckdb/main/appender.hpp +6 -6
- package/src/duckdb/src/include/duckdb/main/attached_database.hpp +3 -1
- package/src/duckdb/src/include/duckdb/main/buffered_data/buffered_data.hpp +2 -2
- package/src/duckdb/src/include/duckdb/main/buffered_data/simple_buffered_data.hpp +1 -1
- package/src/duckdb/src/include/duckdb/main/capi/capi_internal.hpp +2 -2
- package/src/duckdb/src/include/duckdb/main/chunk_scan_state/query_result.hpp +2 -2
- package/src/duckdb/src/include/duckdb/main/client_context.hpp +1 -1
- package/src/duckdb/src/include/duckdb/main/client_context_file_opener.hpp +3 -2
- package/src/duckdb/src/include/duckdb/main/client_data.hpp +1 -0
- package/src/duckdb/src/include/duckdb/main/client_properties.hpp +2 -1
- package/src/duckdb/src/include/duckdb/main/config.hpp +14 -5
- package/src/duckdb/src/include/duckdb/main/connection.hpp +27 -26
- package/src/duckdb/src/include/duckdb/main/database.hpp +19 -3
- package/src/duckdb/src/include/duckdb/main/database_file_opener.hpp +58 -0
- package/src/duckdb/src/include/duckdb/main/database_path_and_type.hpp +2 -2
- package/src/duckdb/src/include/duckdb/main/error_manager.hpp +6 -6
- package/src/duckdb/src/include/duckdb/main/extension_entries.hpp +8 -0
- package/src/duckdb/src/include/duckdb/main/extension_helper.hpp +1 -0
- package/src/duckdb/src/include/duckdb/main/external_dependencies.hpp +2 -1
- package/src/duckdb/src/include/duckdb/main/prepared_statement.hpp +8 -8
- package/src/duckdb/src/include/duckdb/main/query_profiler.hpp +2 -59
- package/src/duckdb/src/include/duckdb/main/query_result.hpp +3 -3
- package/src/duckdb/src/include/duckdb/main/relation/query_relation.hpp +1 -1
- package/src/duckdb/src/include/duckdb/main/relation.hpp +1 -1
- package/src/duckdb/src/include/duckdb/main/secret/secret.hpp +11 -7
- package/src/duckdb/src/include/duckdb/main/secret/secret_manager.hpp +2 -2
- package/src/duckdb/src/include/duckdb/main/secret/secret_storage.hpp +4 -4
- package/src/duckdb/src/include/duckdb/main/settings.hpp +78 -70
- package/src/duckdb/src/include/duckdb/optimizer/column_lifetime_analyzer.hpp +45 -0
- package/src/duckdb/src/include/duckdb/optimizer/compressed_materialization.hpp +11 -13
- package/src/duckdb/src/include/duckdb/optimizer/join_order/cardinality_estimator.hpp +2 -2
- package/src/duckdb/src/include/duckdb/optimizer/join_order/cost_model.hpp +1 -1
- package/src/duckdb/src/include/duckdb/optimizer/join_order/join_node.hpp +1 -1
- package/src/duckdb/src/include/duckdb/optimizer/join_order/query_graph.hpp +1 -1
- package/src/duckdb/src/include/duckdb/optimizer/join_order/query_graph_manager.hpp +1 -1
- package/src/duckdb/src/include/duckdb/optimizer/join_order/relation_manager.hpp +1 -1
- package/src/duckdb/src/include/duckdb/optimizer/matcher/expression_matcher.hpp +7 -7
- package/src/duckdb/src/include/duckdb/optimizer/matcher/function_matcher.hpp +7 -7
- package/src/duckdb/src/include/duckdb/optimizer/matcher/type_matcher.hpp +1 -1
- package/src/duckdb/src/include/duckdb/optimizer/optimizer.hpp +3 -0
- package/src/duckdb/src/include/duckdb/optimizer/statistics_propagator.hpp +32 -30
- package/src/duckdb/src/include/duckdb/optimizer/unnest_rewriter.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parallel/event.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parallel/executor_task.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parallel/interrupt.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parallel/pipeline_event.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/column_list.hpp +4 -4
- package/src/duckdb/src/include/duckdb/parser/constraints/unique_constraint.hpp +49 -8
- package/src/duckdb/src/include/duckdb/parser/expression/bound_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/parsed_data/alter_scalar_function_info.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_table_function_info.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_table_info.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/copy_database_info.hpp +40 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_function_info.hpp +2 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_index_info.hpp +1 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_info.hpp +2 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_macro_info.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_pragma_function_info.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_secret_info.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_data/extra_drop_info.hpp +3 -3
- package/src/duckdb/src/include/duckdb/parser/parsed_data/parse_info.hpp +3 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_data/vacuum_info.hpp +2 -5
- package/src/duckdb/src/include/duckdb/parser/parser.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/parser_extension.hpp +3 -3
- package/src/duckdb/src/include/duckdb/parser/query_error_context.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/transformer.hpp +3 -5
- package/src/duckdb/src/include/duckdb/planner/bind_context.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/binder.hpp +16 -9
- package/src/duckdb/src/include/duckdb/planner/expression/bound_case_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_cast_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_default_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_expanded_expression.hpp +34 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_subquery_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/base_select_binder.hpp +5 -8
- package/src/duckdb/src/include/duckdb/planner/expression_binder/column_alias_binder.hpp +3 -4
- package/src/duckdb/src/include/duckdb/planner/expression_binder/group_binder.hpp +3 -2
- package/src/duckdb/src/include/duckdb/planner/expression_binder/having_binder.hpp +3 -5
- package/src/duckdb/src/include/duckdb/planner/expression_binder/order_binder.hpp +6 -14
- package/src/duckdb/src/include/duckdb/planner/expression_binder/qualify_binder.hpp +3 -6
- package/src/duckdb/src/include/duckdb/planner/expression_binder/select_bind_state.hpp +52 -0
- package/src/duckdb/src/include/duckdb/planner/expression_binder/select_binder.hpp +4 -10
- package/src/duckdb/src/include/duckdb/planner/expression_binder/table_function_binder.hpp +5 -2
- package/src/duckdb/src/include/duckdb/planner/expression_binder.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/expression_iterator.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/filter/conjunction_filter.hpp +3 -6
- package/src/duckdb/src/include/duckdb/planner/logical_operator.hpp +2 -0
- package/src/duckdb/src/include/duckdb/planner/logical_tokens.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/list.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_copy_database.hpp +4 -12
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create_secret.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_cteref.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delim_get.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_dummy_scan.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_explain.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_export.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_expression_get.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_extension_operator.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_materialized_cte.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pragma.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_prepare.hpp +3 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_recursive_cte.hpp +3 -3
- package/src/duckdb/src/include/duckdb/planner/operator/logical_reset.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_set.hpp +2 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_vacuum.hpp +52 -0
- package/src/duckdb/src/include/duckdb/planner/operator_extension.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/parsed_data/bound_create_table_info.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/query_node/bound_select_node.hpp +5 -4
- package/src/duckdb/src/include/duckdb/planner/subquery/flatten_dependent_join.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/arena_allocator.hpp +4 -1
- package/src/duckdb/src/include/duckdb/storage/buffer/block_handle.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/buffer_manager.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/checkpoint/row_group_writer.hpp +2 -3
- package/src/duckdb/src/include/duckdb/storage/checkpoint/string_checkpoint_state.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/checkpoint/table_data_writer.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/checkpoint_manager.hpp +5 -5
- package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_analyze.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_compress.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_fetch.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_scan.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/alprd/algorithm/alprd.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/compression/alprd/alprd_analyze.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/compression/alprd/alprd_compress.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/alprd/alprd_fetch.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/alprd/alprd_scan.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/algorithm/flag_buffer.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/algorithm/leading_zero_buffer.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_analyze.hpp +0 -1
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_fetch.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_scan.hpp +4 -4
- package/src/duckdb/src/include/duckdb/storage/compression/patas/patas.hpp +4 -4
- package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_analyze.hpp +0 -1
- package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_fetch.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_scan.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/data_pointer.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/index.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/magic_bytes.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/object_cache.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/optimistic_data_writer.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/partial_block_manager.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/single_file_block_manager.hpp +4 -1
- package/src/duckdb/src/include/duckdb/storage/standard_buffer_manager.hpp +24 -24
- package/src/duckdb/src/include/duckdb/storage/statistics/numeric_stats_union.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/statistics/segment_statistics.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/storage_info.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/storage_manager.hpp +4 -4
- package/src/duckdb/src/include/duckdb/storage/string_uncompressed.hpp +9 -6
- package/src/duckdb/src/include/duckdb/storage/table/append_state.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/chunk_info.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/table/column_checkpoint_state.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/column_data.hpp +10 -1
- package/src/duckdb/src/include/duckdb/storage/table/data_table_info.hpp +3 -2
- package/src/duckdb/src/include/duckdb/storage/table/row_group.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/row_group_segment_tree.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/row_version_manager.hpp +2 -1
- package/src/duckdb/src/include/duckdb/storage/table/scan_state.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/table/segment_lock.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/segment_tree.hpp +4 -4
- package/src/duckdb/src/include/duckdb/storage/table/standard_column_data.hpp +2 -0
- package/src/duckdb/src/include/duckdb/storage/table/table_index_list.hpp +3 -2
- package/src/duckdb/src/include/duckdb/storage/table/table_statistics.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/update_segment.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table_storage_info.hpp +2 -1
- package/src/duckdb/src/include/duckdb/storage/write_ahead_log.hpp +1 -1
- package/src/duckdb/src/include/duckdb/transaction/delete_info.hpp +20 -1
- package/src/duckdb/src/include/duckdb/transaction/transaction.hpp +1 -1
- package/src/duckdb/src/include/duckdb/transaction/transaction_data.hpp +1 -1
- package/src/duckdb/src/include/duckdb/transaction/undo_buffer.hpp +1 -1
- package/src/duckdb/src/include/duckdb/transaction/update_info.hpp +1 -1
- package/src/duckdb/src/main/appender.cpp +1 -1
- package/src/duckdb/src/main/attached_database.cpp +11 -3
- package/src/duckdb/src/main/capi/arrow-c.cpp +6 -2
- package/src/duckdb/src/main/capi/cast/utils-c.cpp +1 -1
- package/src/duckdb/src/main/capi/duckdb-c.cpp +1 -1
- package/src/duckdb/src/main/capi/pending-c.cpp +1 -1
- package/src/duckdb/src/main/capi/prepared-c.cpp +2 -2
- package/src/duckdb/src/main/capi/result-c.cpp +4 -4
- package/src/duckdb/src/main/client_context.cpp +4 -12
- package/src/duckdb/src/main/client_context_file_opener.cpp +15 -3
- package/src/duckdb/src/main/client_data.cpp +5 -0
- package/src/duckdb/src/main/config.cpp +82 -82
- package/src/duckdb/src/main/database.cpp +31 -7
- package/src/duckdb/src/main/database_manager.cpp +3 -2
- package/src/duckdb/src/main/database_path_and_type.cpp +4 -4
- package/src/duckdb/src/main/error_manager.cpp +1 -1
- package/src/duckdb/src/main/extension/extension_alias.cpp +9 -9
- package/src/duckdb/src/main/extension/extension_helper.cpp +10 -5
- package/src/duckdb/src/main/extension/extension_install.cpp +1 -1
- package/src/duckdb/src/main/extension/extension_load.cpp +111 -37
- package/src/duckdb/src/main/query_profiler.cpp +1 -118
- package/src/duckdb/src/main/secret/secret_manager.cpp +1 -2
- package/src/duckdb/src/main/secret/secret_storage.cpp +1 -1
- package/src/duckdb/src/main/settings/settings.cpp +81 -65
- package/src/duckdb/src/optimizer/column_lifetime_analyzer.cpp +8 -1
- package/src/duckdb/src/optimizer/compressed_materialization/compress_aggregate.cpp +3 -0
- package/src/duckdb/src/optimizer/compressed_materialization.cpp +26 -28
- package/src/duckdb/src/optimizer/cse_optimizer.cpp +5 -5
- package/src/duckdb/src/optimizer/join_order/cardinality_estimator.cpp +10 -6
- package/src/duckdb/src/optimizer/optimizer.cpp +14 -17
- package/src/duckdb/src/optimizer/pushdown/pushdown_cross_product.cpp +16 -5
- package/src/duckdb/src/optimizer/pushdown/pushdown_inner_join.cpp +7 -4
- package/src/duckdb/src/optimizer/pushdown/pushdown_set_operation.cpp +2 -2
- package/src/duckdb/src/optimizer/remove_unused_columns.cpp +3 -3
- package/src/duckdb/src/optimizer/rule/ordered_aggregate_optimizer.cpp +2 -2
- package/src/duckdb/src/optimizer/statistics/expression/propagate_aggregate.cpp +1 -1
- package/src/duckdb/src/optimizer/statistics/expression/propagate_between.cpp +8 -8
- package/src/duckdb/src/optimizer/statistics/expression/propagate_case.cpp +1 -1
- package/src/duckdb/src/optimizer/statistics/expression/propagate_cast.cpp +1 -1
- package/src/duckdb/src/optimizer/statistics/expression/propagate_columnref.cpp +1 -1
- package/src/duckdb/src/optimizer/statistics/expression/propagate_comparison.cpp +7 -7
- package/src/duckdb/src/optimizer/statistics/expression/propagate_conjunction.cpp +6 -6
- package/src/duckdb/src/optimizer/statistics/expression/propagate_constant.cpp +1 -1
- package/src/duckdb/src/optimizer/statistics/expression/propagate_function.cpp +2 -2
- package/src/duckdb/src/optimizer/statistics/expression/propagate_operator.cpp +10 -10
- package/src/duckdb/src/optimizer/statistics/operator/propagate_aggregate.cpp +1 -1
- package/src/duckdb/src/optimizer/statistics/operator/propagate_cross_product.cpp +1 -1
- package/src/duckdb/src/optimizer/statistics/operator/propagate_filter.cpp +14 -7
- package/src/duckdb/src/optimizer/statistics/operator/propagate_get.cpp +2 -2
- package/src/duckdb/src/optimizer/statistics/operator/propagate_join.cpp +9 -9
- package/src/duckdb/src/optimizer/statistics/operator/propagate_limit.cpp +1 -1
- package/src/duckdb/src/optimizer/statistics/operator/propagate_order.cpp +1 -1
- package/src/duckdb/src/optimizer/statistics/operator/propagate_projection.cpp +2 -2
- package/src/duckdb/src/optimizer/statistics/operator/propagate_set_operation.cpp +1 -1
- package/src/duckdb/src/optimizer/statistics/operator/propagate_window.cpp +1 -1
- package/src/duckdb/src/optimizer/statistics_propagator.cpp +39 -18
- package/src/duckdb/src/parallel/pipeline_finish_event.cpp +1 -1
- package/src/duckdb/src/parallel/task_scheduler.cpp +8 -1
- package/src/duckdb/src/parser/constraints/unique_constraint.cpp +4 -2
- package/src/duckdb/src/parser/parsed_data/create_index_info.cpp +64 -0
- package/src/duckdb/src/parser/parsed_data/vacuum_info.cpp +1 -0
- package/src/duckdb/src/parser/transform/expression/transform_function.cpp +13 -5
- package/src/duckdb/src/parser/transform/expression/transform_subquery.cpp +24 -0
- package/src/duckdb/src/parser/transform/helpers/transform_cte.cpp +1 -8
- package/src/duckdb/src/parser/transform/statement/transform_create_function.cpp +2 -1
- package/src/duckdb/src/parser/transform/statement/transform_create_index.cpp +3 -0
- package/src/duckdb/src/parser/transform/statement/transform_delete.cpp +2 -6
- package/src/duckdb/src/parser/transform/statement/transform_insert.cpp +2 -6
- package/src/duckdb/src/parser/transform/statement/transform_pivot_stmt.cpp +2 -6
- package/src/duckdb/src/parser/transform/statement/transform_pragma.cpp +1 -1
- package/src/duckdb/src/parser/transform/statement/transform_select.cpp +5 -2
- package/src/duckdb/src/parser/transform/statement/transform_select_node.cpp +2 -8
- package/src/duckdb/src/parser/transform/statement/transform_update.cpp +1 -6
- package/src/duckdb/src/parser/transform/statement/transform_use.cpp +3 -2
- package/src/duckdb/src/parser/transformer.cpp +14 -2
- package/src/duckdb/src/planner/binder/expression/bind_aggregate_expression.cpp +40 -17
- package/src/duckdb/src/planner/binder/expression/bind_unnest_expression.cpp +8 -3
- package/src/duckdb/src/planner/binder/expression/bind_window_expression.cpp +32 -30
- package/src/duckdb/src/planner/binder/query_node/bind_cte_node.cpp +28 -17
- package/src/duckdb/src/planner/binder/query_node/bind_select_node.cpp +146 -101
- package/src/duckdb/src/planner/binder/query_node/bind_setop_node.cpp +28 -26
- package/src/duckdb/src/planner/binder/query_node/plan_cte_node.cpp +29 -0
- package/src/duckdb/src/planner/binder/query_node/plan_subquery.cpp +10 -10
- package/src/duckdb/src/planner/binder/statement/bind_copy.cpp +3 -2
- package/src/duckdb/src/planner/binder/statement/bind_copy_database.cpp +23 -28
- package/src/duckdb/src/planner/binder/statement/bind_create.cpp +11 -12
- package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +9 -11
- package/src/duckdb/src/planner/binder/statement/bind_insert.cpp +10 -13
- package/src/duckdb/src/planner/binder/statement/bind_pragma.cpp +3 -3
- package/src/duckdb/src/planner/binder/statement/bind_set.cpp +3 -0
- package/src/duckdb/src/planner/binder/statement/bind_vacuum.cpp +66 -65
- package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +54 -46
- package/src/duckdb/src/planner/binder/tableref/bind_pivot.cpp +3 -0
- package/src/duckdb/src/planner/binder/tableref/bind_subqueryref.cpp +1 -1
- package/src/duckdb/src/planner/binder/tableref/bind_table_function.cpp +5 -5
- package/src/duckdb/src/planner/binder.cpp +78 -6
- package/src/duckdb/src/planner/expression/bound_cast_expression.cpp +11 -3
- package/src/duckdb/src/planner/expression/bound_expanded_expression.cpp +22 -0
- package/src/duckdb/src/planner/expression_binder/base_select_binder.cpp +11 -58
- package/src/duckdb/src/planner/expression_binder/column_alias_binder.cpp +5 -8
- package/src/duckdb/src/planner/expression_binder/group_binder.cpp +5 -4
- package/src/duckdb/src/planner/expression_binder/having_binder.cpp +5 -19
- package/src/duckdb/src/planner/expression_binder/lateral_binder.cpp +8 -8
- package/src/duckdb/src/planner/expression_binder/order_binder.cpp +42 -26
- package/src/duckdb/src/planner/expression_binder/qualify_binder.cpp +3 -22
- package/src/duckdb/src/planner/expression_binder/select_bind_state.cpp +52 -0
- package/src/duckdb/src/planner/expression_binder/select_binder.cpp +43 -5
- package/src/duckdb/src/planner/expression_binder/table_function_binder.cpp +19 -7
- package/src/duckdb/src/planner/logical_operator.cpp +20 -3
- package/src/duckdb/src/planner/operator/logical_copy_database.cpp +4 -14
- package/src/duckdb/src/planner/operator/logical_delete.cpp +1 -1
- package/src/duckdb/src/planner/operator/logical_get.cpp +1 -1
- package/src/duckdb/src/planner/operator/logical_insert.cpp +1 -1
- package/src/duckdb/src/planner/operator/logical_update.cpp +1 -1
- package/src/duckdb/src/planner/operator/logical_vacuum.cpp +65 -0
- package/src/duckdb/src/planner/planner.cpp +4 -4
- package/src/duckdb/src/planner/subquery/flatten_dependent_join.cpp +26 -27
- package/src/duckdb/src/storage/arena_allocator.cpp +9 -0
- package/src/duckdb/src/storage/buffer/buffer_pool_reservation.cpp +1 -1
- package/src/duckdb/src/storage/buffer_manager.cpp +2 -10
- package/src/duckdb/src/storage/checkpoint/table_data_writer.cpp +2 -3
- package/src/duckdb/src/storage/checkpoint_manager.cpp +15 -8
- package/src/duckdb/src/storage/compression/bitpacking.cpp +6 -1
- package/src/duckdb/src/storage/compression/string_uncompressed.cpp +1 -1
- package/src/duckdb/src/storage/data_pointer.cpp +1 -1
- package/src/duckdb/src/storage/data_table.cpp +18 -7
- package/src/duckdb/src/storage/local_storage.cpp +8 -5
- package/src/duckdb/src/storage/magic_bytes.cpp +6 -5
- package/src/duckdb/src/storage/partial_block_manager.cpp +1 -1
- package/src/duckdb/src/storage/serialization/serialize_logical_operator.cpp +20 -9
- package/src/duckdb/src/storage/serialization/serialize_nodes.cpp +12 -10
- package/src/duckdb/src/storage/serialization/serialize_parse_info.cpp +23 -0
- package/src/duckdb/src/storage/single_file_block_manager.cpp +46 -19
- package/src/duckdb/src/storage/standard_buffer_manager.cpp +21 -5
- package/src/duckdb/src/storage/statistics/array_stats.cpp +1 -1
- package/src/duckdb/src/storage/statistics/base_statistics.cpp +2 -3
- package/src/duckdb/src/storage/statistics/list_stats.cpp +1 -1
- package/src/duckdb/src/storage/statistics/struct_stats.cpp +1 -1
- package/src/duckdb/src/storage/storage_info.cpp +19 -19
- package/src/duckdb/src/storage/storage_manager.cpp +18 -13
- package/src/duckdb/src/storage/table/chunk_info.cpp +11 -3
- package/src/duckdb/src/storage/table/column_data.cpp +88 -66
- package/src/duckdb/src/storage/table/row_group.cpp +7 -7
- package/src/duckdb/src/storage/table/row_version_manager.cpp +2 -2
- package/src/duckdb/src/storage/table/standard_column_data.cpp +4 -0
- package/src/duckdb/src/storage/table/update_segment.cpp +3 -1
- package/src/duckdb/src/storage/table_index_list.cpp +6 -1
- package/src/duckdb/src/storage/temporary_file_manager.cpp +1 -1
- package/src/duckdb/src/storage/wal_replay.cpp +8 -7
- package/src/duckdb/src/storage/write_ahead_log.cpp +3 -4
- package/src/duckdb/src/transaction/cleanup_state.cpp +10 -3
- package/src/duckdb/src/transaction/commit_state.cpp +11 -4
- package/src/duckdb/src/transaction/duck_transaction.cpp +23 -3
- package/src/duckdb/src/transaction/rollback_state.cpp +1 -1
- package/src/duckdb/src/transaction/transaction_context.cpp +1 -1
- package/src/duckdb/src/transaction/undo_buffer.cpp +3 -1
- package/src/duckdb/third_party/fmt/include/fmt/core.h +0 -5
- package/src/duckdb/third_party/fsst/fsst.h +1 -1
- package/src/duckdb/third_party/fsst/libfsst.cpp +1 -140
- package/src/duckdb/third_party/fsst/libfsst.hpp +0 -13
- package/src/duckdb/third_party/hyperloglog/hyperloglog.hpp +4 -0
- package/src/duckdb/third_party/libpg_query/include/nodes/parsenodes.hpp +8 -1
- package/src/duckdb/third_party/libpg_query/include/parser/gram.hpp +2 -1
- package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +15401 -15354
- package/src/duckdb/third_party/libpg_query/src_backend_parser_scan.cpp +299 -538
- package/src/duckdb/third_party/lz4/lz4.cpp +2605 -0
- package/src/duckdb/third_party/lz4/lz4.hpp +843 -0
- package/src/duckdb/third_party/parquet/parquet_types.cpp +3 -0
- package/src/duckdb/third_party/parquet/parquet_types.h +2 -1
- package/src/duckdb/third_party/re2/re2/bitmap256.cc +44 -0
- package/src/duckdb/third_party/re2/re2/bitmap256.h +3 -35
- package/src/duckdb/third_party/re2/re2/bitstate.cc +31 -24
- package/src/duckdb/third_party/re2/re2/compile.cc +146 -164
- package/src/duckdb/third_party/re2/re2/dfa.cc +174 -181
- package/src/duckdb/third_party/re2/re2/filtered_re2.cc +19 -3
- package/src/duckdb/third_party/re2/re2/filtered_re2.h +27 -23
- package/src/duckdb/third_party/re2/re2/mimics_pcre.cc +21 -11
- package/src/duckdb/third_party/re2/re2/nfa.cc +91 -131
- package/src/duckdb/third_party/re2/re2/onepass.cc +11 -10
- package/src/duckdb/third_party/re2/re2/parse.cc +171 -154
- package/src/duckdb/third_party/re2/re2/perl_groups.cc +35 -35
- package/src/duckdb/third_party/re2/re2/pod_array.h +55 -0
- package/src/duckdb/third_party/re2/re2/prefilter.cc +40 -40
- package/src/duckdb/third_party/re2/re2/prefilter.h +24 -2
- package/src/duckdb/third_party/re2/re2/prefilter_tree.cc +70 -84
- package/src/duckdb/third_party/re2/re2/prefilter_tree.h +5 -4
- package/src/duckdb/third_party/re2/re2/prog.cc +315 -58
- package/src/duckdb/third_party/re2/re2/prog.h +77 -44
- package/src/duckdb/third_party/re2/re2/re2.cc +333 -221
- package/src/duckdb/third_party/re2/re2/re2.h +277 -201
- package/src/duckdb/third_party/re2/re2/regexp.cc +137 -105
- package/src/duckdb/third_party/re2/re2/regexp.h +45 -40
- package/src/duckdb/third_party/re2/re2/set.cc +40 -17
- package/src/duckdb/third_party/re2/re2/set.h +11 -6
- package/src/duckdb/third_party/re2/re2/simplify.cc +50 -41
- package/src/duckdb/third_party/re2/re2/sparse_array.h +392 -0
- package/src/duckdb/third_party/re2/re2/sparse_set.h +264 -0
- package/src/duckdb/third_party/re2/re2/stringpiece.cc +1 -1
- package/src/duckdb/third_party/re2/re2/stringpiece.h +11 -8
- package/src/duckdb/third_party/re2/re2/tostring.cc +8 -6
- package/src/duckdb/third_party/re2/re2/unicode_casefold.cc +39 -10
- package/src/duckdb/third_party/re2/re2/unicode_casefold.h +1 -1
- package/src/duckdb/third_party/re2/re2/unicode_groups.cc +5019 -4566
- package/src/duckdb/third_party/re2/re2/unicode_groups.h +1 -1
- package/src/duckdb/third_party/re2/re2/walker-inl.h +21 -20
- package/src/duckdb/third_party/re2/util/logging.h +14 -18
- package/src/duckdb/third_party/re2/util/mix.h +4 -4
- package/src/duckdb/third_party/re2/util/mutex.h +48 -15
- package/src/duckdb/third_party/re2/util/rune.cc +5 -5
- package/src/duckdb/third_party/re2/util/strutil.cc +1 -16
- package/src/duckdb/third_party/re2/util/strutil.h +1 -3
- package/src/duckdb/third_party/re2/util/utf.h +1 -1
- package/src/duckdb/third_party/re2/util/util.h +9 -1
- package/src/duckdb/third_party/utf8proc/include/utf8proc_wrapper.hpp +2 -0
- package/src/duckdb/third_party/utf8proc/utf8proc_wrapper.cpp +36 -1
- package/src/duckdb/ub_src_common.cpp +0 -2
- package/src/duckdb/ub_src_execution_physical_plan.cpp +2 -0
- package/src/duckdb/ub_src_planner_expression.cpp +2 -0
- package/src/duckdb/ub_src_planner_expression_binder.cpp +2 -0
- package/src/duckdb/ub_src_planner_operator.cpp +2 -0
- package/test/jsdoc.test.ts +3 -0
@@ -28,7 +28,7 @@ namespace duckdb {
|
|
28
28
|
template <class T>
|
29
29
|
struct AlpRDVectorState {
|
30
30
|
public:
|
31
|
-
using EXACT_TYPE = typename FloatingToExact<T>::
|
31
|
+
using EXACT_TYPE = typename FloatingToExact<T>::TYPE;
|
32
32
|
|
33
33
|
void Reset() {
|
34
34
|
index = 0;
|
@@ -70,7 +70,7 @@ public:
|
|
70
70
|
template <class T>
|
71
71
|
struct AlpRDScanState : public SegmentScanState {
|
72
72
|
public:
|
73
|
-
using EXACT_TYPE = typename FloatingToExact<T>::
|
73
|
+
using EXACT_TYPE = typename FloatingToExact<T>::TYPE;
|
74
74
|
|
75
75
|
explicit AlpRDScanState(ColumnSegment &segment) : segment(segment), count(segment.count) {
|
76
76
|
auto &buffer_manager = BufferManager::GetBufferManager(segment.db);
|
@@ -220,7 +220,7 @@ unique_ptr<SegmentScanState> AlpRDInitScan(ColumnSegment &segment) {
|
|
220
220
|
template <class T>
|
221
221
|
void AlpRDScanPartial(ColumnSegment &segment, ColumnScanState &state, idx_t scan_count, Vector &result,
|
222
222
|
idx_t result_offset) {
|
223
|
-
using EXACT_TYPE = typename FloatingToExact<T>::
|
223
|
+
using EXACT_TYPE = typename FloatingToExact<T>::TYPE;
|
224
224
|
auto &scan_state = (AlpRDScanState<T> &)*state.scan_state;
|
225
225
|
|
226
226
|
// Get the pointer to the result values
|
package/src/duckdb/src/include/duckdb/storage/compression/chimp/algorithm/leading_zero_buffer.hpp
CHANGED
@@ -77,7 +77,7 @@ public:
|
|
77
77
|
}
|
78
78
|
|
79
79
|
uint64_t BitsWritten() const {
|
80
|
-
return counter *
|
80
|
+
return counter * 3ULL;
|
81
81
|
}
|
82
82
|
|
83
83
|
// Reset the counter, but don't replace the buffer
|
@@ -98,7 +98,7 @@ public:
|
|
98
98
|
#endif
|
99
99
|
|
100
100
|
inline uint64_t BlockIndex() const {
|
101
|
-
return ((counter >>
|
101
|
+
return ((counter >> 3ULL) * (LEADING_ZERO_BLOCK_BIT_SIZE / 8ULL));
|
102
102
|
}
|
103
103
|
|
104
104
|
void FlushBuffer() {
|
@@ -111,7 +111,7 @@ public:
|
|
111
111
|
// Verify that the bits are copied correctly
|
112
112
|
|
113
113
|
uint32_t temp_value = 0;
|
114
|
-
memcpy(
|
114
|
+
memcpy(reinterpret_cast<uint8_t *>(&temp_value), (void *)(buffer + buffer_idx), 3);
|
115
115
|
for (idx_t i = 0; i < flags.size(); i++) {
|
116
116
|
D_ASSERT(flags[i] == ExtractValue(temp_value, i));
|
117
117
|
}
|
@@ -25,12 +25,12 @@ struct ChimpType {};
|
|
25
25
|
|
26
26
|
template <>
|
27
27
|
struct ChimpType<double> {
|
28
|
-
|
28
|
+
using TYPE = uint64_t;
|
29
29
|
};
|
30
30
|
|
31
31
|
template <>
|
32
32
|
struct ChimpType<float> {
|
33
|
-
|
33
|
+
using TYPE = uint32_t;
|
34
34
|
};
|
35
35
|
|
36
36
|
class ChimpPrimitives {
|
@@ -46,7 +46,7 @@ public:
|
|
46
46
|
template <class T, bool EMPTY>
|
47
47
|
struct ChimpState {
|
48
48
|
public:
|
49
|
-
using CHIMP_TYPE = typename ChimpType<T>::
|
49
|
+
using CHIMP_TYPE = typename ChimpType<T>::TYPE;
|
50
50
|
|
51
51
|
ChimpState() : chimp() {
|
52
52
|
}
|
@@ -33,7 +33,6 @@ bool ChimpAnalyze(AnalyzeState &state, Vector &input, idx_t count) {
|
|
33
33
|
template <class T>
|
34
34
|
idx_t ChimpFinalAnalyze(AnalyzeState &state) {
|
35
35
|
throw InternalException("Chimp has been deprecated, can no longer be used to compress data");
|
36
|
-
return DConstants::INVALID_INDEX;
|
37
36
|
}
|
38
37
|
|
39
38
|
} // namespace duckdb
|
@@ -26,7 +26,7 @@ namespace duckdb {
|
|
26
26
|
|
27
27
|
template <class T>
|
28
28
|
void ChimpFetchRow(ColumnSegment &segment, ColumnFetchState &state, row_t row_id, Vector &result, idx_t result_idx) {
|
29
|
-
using INTERNAL_TYPE = typename ChimpType<T>::
|
29
|
+
using INTERNAL_TYPE = typename ChimpType<T>::TYPE;
|
30
30
|
|
31
31
|
ChimpScanState<T> scan_state(segment);
|
32
32
|
scan_state.Skip(segment, row_id);
|
@@ -135,7 +135,7 @@ private:
|
|
135
135
|
template <class T>
|
136
136
|
struct ChimpScanState : public SegmentScanState {
|
137
137
|
public:
|
138
|
-
using CHIMP_TYPE = typename ChimpType<T>::
|
138
|
+
using CHIMP_TYPE = typename ChimpType<T>::TYPE;
|
139
139
|
|
140
140
|
explicit ChimpScanState(ColumnSegment &segment) : segment(segment), segment_count(segment.count) {
|
141
141
|
auto &buffer_manager = BufferManager::GetBufferManager(segment.db);
|
@@ -203,7 +203,7 @@ public:
|
|
203
203
|
D_ASSERT(leading_zero_block_count <= ChimpPrimitives::CHIMP_SEQUENCE_SIZE / 8);
|
204
204
|
|
205
205
|
// Load the leading zero block count
|
206
|
-
metadata_ptr -=
|
206
|
+
metadata_ptr -= 3ULL * leading_zero_block_count;
|
207
207
|
const auto leading_zero_block_ptr = metadata_ptr;
|
208
208
|
|
209
209
|
// Figure out how many flags there are
|
@@ -240,7 +240,7 @@ public:
|
|
240
240
|
//! Skip the next 'skip_count' values, we don't store the values
|
241
241
|
// TODO: use the metadata to determine if we can skip a group
|
242
242
|
void Skip(ColumnSegment &segment, idx_t skip_count) {
|
243
|
-
using INTERNAL_TYPE = typename ChimpType<T>::
|
243
|
+
using INTERNAL_TYPE = typename ChimpType<T>::TYPE;
|
244
244
|
INTERNAL_TYPE buffer[ChimpPrimitives::CHIMP_SEQUENCE_SIZE];
|
245
245
|
|
246
246
|
while (skip_count) {
|
@@ -263,7 +263,7 @@ unique_ptr<SegmentScanState> ChimpInitScan(ColumnSegment &segment) {
|
|
263
263
|
template <class T>
|
264
264
|
void ChimpScanPartial(ColumnSegment &segment, ColumnScanState &state, idx_t scan_count, Vector &result,
|
265
265
|
idx_t result_offset) {
|
266
|
-
using INTERNAL_TYPE = typename ChimpType<T>::
|
266
|
+
using INTERNAL_TYPE = typename ChimpType<T>::TYPE;
|
267
267
|
auto &scan_state = state.scan_state->Cast<ChimpScanState<T>>();
|
268
268
|
|
269
269
|
T *result_data = FlatVector::GetData<T>(result);
|
@@ -25,20 +25,20 @@ struct FloatingToExact {};
|
|
25
25
|
|
26
26
|
template <>
|
27
27
|
struct FloatingToExact<double> {
|
28
|
-
|
28
|
+
using TYPE = uint64_t;
|
29
29
|
};
|
30
30
|
|
31
31
|
template <>
|
32
32
|
struct FloatingToExact<float> {
|
33
|
-
|
33
|
+
using TYPE = uint32_t;
|
34
34
|
};
|
35
35
|
|
36
36
|
template <class T, bool EMPTY>
|
37
37
|
struct PatasState {
|
38
38
|
public:
|
39
|
-
using EXACT_TYPE = typename FloatingToExact<T>::
|
39
|
+
using EXACT_TYPE = typename FloatingToExact<T>::TYPE;
|
40
40
|
|
41
|
-
PatasState(void *state_p = nullptr) : data_ptr(state_p), patas_state() {
|
41
|
+
explicit PatasState(void *state_p = nullptr) : data_ptr(state_p), patas_state() {
|
42
42
|
}
|
43
43
|
//! The Compress/Analyze State
|
44
44
|
void *data_ptr;
|
@@ -33,7 +33,6 @@ bool PatasAnalyze(AnalyzeState &state, Vector &input, idx_t count) {
|
|
33
33
|
template <class T>
|
34
34
|
idx_t PatasFinalAnalyze(AnalyzeState &state) {
|
35
35
|
throw InternalException("Patas has been deprecated, can no longer be used to compress data");
|
36
|
-
return DConstants::INVALID_INDEX;
|
37
36
|
}
|
38
37
|
|
39
38
|
} // namespace duckdb
|
@@ -26,7 +26,7 @@ namespace duckdb {
|
|
26
26
|
|
27
27
|
template <class T>
|
28
28
|
void PatasFetchRow(ColumnSegment &segment, ColumnFetchState &state, row_t row_id, Vector &result, idx_t result_idx) {
|
29
|
-
using EXACT_TYPE = typename FloatingToExact<T>::
|
29
|
+
using EXACT_TYPE = typename FloatingToExact<T>::TYPE;
|
30
30
|
|
31
31
|
PatasScanState<T> scan_state(segment);
|
32
32
|
scan_state.Skip(segment, row_id);
|
@@ -87,7 +87,7 @@ private:
|
|
87
87
|
template <class T>
|
88
88
|
struct PatasScanState : public SegmentScanState {
|
89
89
|
public:
|
90
|
-
using EXACT_TYPE = typename FloatingToExact<T>::
|
90
|
+
using EXACT_TYPE = typename FloatingToExact<T>::TYPE;
|
91
91
|
|
92
92
|
explicit PatasScanState(ColumnSegment &segment) : segment(segment), count(segment.count) {
|
93
93
|
auto &buffer_manager = BufferManager::GetBufferManager(segment.db);
|
@@ -174,7 +174,7 @@ public:
|
|
174
174
|
public:
|
175
175
|
//! Skip the next 'skip_count' values, we don't store the values
|
176
176
|
void Skip(ColumnSegment &segment, idx_t skip_count) {
|
177
|
-
using EXACT_TYPE = typename FloatingToExact<T>::
|
177
|
+
using EXACT_TYPE = typename FloatingToExact<T>::TYPE;
|
178
178
|
|
179
179
|
if (total_value_count != 0 && !GroupFinished()) {
|
180
180
|
// Finish skipping the current group
|
@@ -210,7 +210,7 @@ unique_ptr<SegmentScanState> PatasInitScan(ColumnSegment &segment) {
|
|
210
210
|
template <class T>
|
211
211
|
void PatasScanPartial(ColumnSegment &segment, ColumnScanState &state, idx_t scan_count, Vector &result,
|
212
212
|
idx_t result_offset) {
|
213
|
-
using EXACT_TYPE = typename FloatingToExact<T>::
|
213
|
+
using EXACT_TYPE = typename FloatingToExact<T>::TYPE;
|
214
214
|
auto &scan_state = (PatasScanState<T> &)*state.scan_state;
|
215
215
|
|
216
216
|
// Get the pointer to the result values
|
@@ -46,8 +46,8 @@ public:
|
|
46
46
|
return std::static_pointer_cast<T, ObjectCacheEntry>(object);
|
47
47
|
}
|
48
48
|
|
49
|
-
template <class T, class...
|
50
|
-
shared_ptr<T> GetOrCreate(const string &key,
|
49
|
+
template <class T, class... ARGS>
|
50
|
+
shared_ptr<T> GetOrCreate(const string &key, ARGS &&... args) {
|
51
51
|
lock_guard<mutex> glock(lock);
|
52
52
|
|
53
53
|
auto entry = cache.find(key);
|
@@ -65,7 +65,7 @@ public:
|
|
65
65
|
|
66
66
|
void Put(string key, shared_ptr<ObjectCacheEntry> value) {
|
67
67
|
lock_guard<mutex> glock(lock);
|
68
|
-
cache
|
68
|
+
cache.insert(make_pair(std::move(key), std::move(value)));
|
69
69
|
}
|
70
70
|
|
71
71
|
void Delete(const string &key) {
|
@@ -15,7 +15,7 @@ class PartialBlockManager;
|
|
15
15
|
|
16
16
|
class OptimisticDataWriter {
|
17
17
|
public:
|
18
|
-
OptimisticDataWriter(DataTable &table);
|
18
|
+
explicit OptimisticDataWriter(DataTable &table);
|
19
19
|
OptimisticDataWriter(DataTable &table, OptimisticDataWriter &parent);
|
20
20
|
~OptimisticDataWriter();
|
21
21
|
|
@@ -110,7 +110,7 @@ public:
|
|
110
110
|
PartialBlockAllocation GetBlockAllocation(uint32_t segment_size);
|
111
111
|
|
112
112
|
//! Register a partially filled block that is filled with "segment_size" entries
|
113
|
-
void RegisterPartialBlock(PartialBlockAllocation
|
113
|
+
void RegisterPartialBlock(PartialBlockAllocation allocation);
|
114
114
|
|
115
115
|
//! Clear remaining blocks without writing them to disk
|
116
116
|
void ClearBlocks();
|
@@ -36,7 +36,7 @@ class SingleFileBlockManager : public BlockManager {
|
|
36
36
|
public:
|
37
37
|
SingleFileBlockManager(AttachedDatabase &db, string path, StorageManagerOptions options);
|
38
38
|
|
39
|
-
|
39
|
+
FileOpenFlags GetFileFlags(bool create_new) const;
|
40
40
|
void CreateNewDatabase();
|
41
41
|
void LoadExistingDatabase();
|
42
42
|
|
@@ -80,6 +80,7 @@ private:
|
|
80
80
|
|
81
81
|
//! Return the blocks to which we will write the free list and modified blocks
|
82
82
|
vector<MetadataHandle> GetFreeListBlocks();
|
83
|
+
void TrimFreeBlocks();
|
83
84
|
|
84
85
|
private:
|
85
86
|
AttachedDatabase &db;
|
@@ -93,6 +94,8 @@ private:
|
|
93
94
|
FileBuffer header_buffer;
|
94
95
|
//! The list of free blocks that can be written to currently
|
95
96
|
set<block_id_t> free_list;
|
97
|
+
//! The list of blocks that were freed since the last checkpoint.
|
98
|
+
set<block_id_t> newly_freed_list;
|
96
99
|
//! The list of multi-use blocks (i.e. blocks that have >1 reference in the file)
|
97
100
|
//! When a multi-use block is marked as modified, the reference count is decreased by 1 instead of directly
|
98
101
|
//! Appending the block to the modified_blocks list
|
@@ -36,7 +36,7 @@ class StandardBufferManager : public BufferManager {
|
|
36
36
|
|
37
37
|
public:
|
38
38
|
StandardBufferManager(DatabaseInstance &db, string temp_directory);
|
39
|
-
|
39
|
+
~StandardBufferManager() override;
|
40
40
|
|
41
41
|
public:
|
42
42
|
static unique_ptr<StandardBufferManager> CreateBufferManager(DatabaseInstance &db, string temp_directory);
|
@@ -46,41 +46,41 @@ public:
|
|
46
46
|
//! Registers an in-memory buffer that cannot be unloaded until it is destroyed
|
47
47
|
//! This buffer can be small (smaller than BLOCK_SIZE)
|
48
48
|
//! Unpin and pin are nops on this block of memory
|
49
|
-
shared_ptr<BlockHandle> RegisterSmallMemory(idx_t block_size) final
|
49
|
+
shared_ptr<BlockHandle> RegisterSmallMemory(idx_t block_size) final;
|
50
50
|
|
51
|
-
idx_t GetUsedMemory() const final
|
52
|
-
idx_t GetMaxMemory() const final
|
51
|
+
idx_t GetUsedMemory() const final;
|
52
|
+
idx_t GetMaxMemory() const final;
|
53
53
|
|
54
54
|
//! Allocate an in-memory buffer with a single pin.
|
55
55
|
//! The allocated memory is released when the buffer handle is destroyed.
|
56
56
|
DUCKDB_API BufferHandle Allocate(MemoryTag tag, idx_t block_size, bool can_destroy = true,
|
57
|
-
shared_ptr<BlockHandle> *block = nullptr) final
|
57
|
+
shared_ptr<BlockHandle> *block = nullptr) final;
|
58
58
|
|
59
59
|
//! Reallocate an in-memory buffer that is pinned.
|
60
|
-
void ReAllocate(shared_ptr<BlockHandle> &handle, idx_t block_size) final
|
60
|
+
void ReAllocate(shared_ptr<BlockHandle> &handle, idx_t block_size) final;
|
61
61
|
|
62
|
-
BufferHandle Pin(shared_ptr<BlockHandle> &handle) final
|
63
|
-
void Unpin(shared_ptr<BlockHandle> &handle) final
|
62
|
+
BufferHandle Pin(shared_ptr<BlockHandle> &handle) final;
|
63
|
+
void Unpin(shared_ptr<BlockHandle> &handle) final;
|
64
64
|
|
65
65
|
//! Set a new memory limit to the buffer manager, throws an exception if the new limit is too low and not enough
|
66
66
|
//! blocks can be evicted
|
67
|
-
void SetLimit(idx_t limit = (idx_t)-1) final
|
67
|
+
void SetLimit(idx_t limit = (idx_t)-1) final;
|
68
68
|
|
69
69
|
//! Returns informaton about memory usage
|
70
70
|
vector<MemoryInformation> GetMemoryUsageInfo() const override;
|
71
71
|
|
72
72
|
//! Returns a list of all temporary files
|
73
|
-
vector<TemporaryFileInformation> GetTemporaryFiles() final
|
73
|
+
vector<TemporaryFileInformation> GetTemporaryFiles() final;
|
74
74
|
|
75
|
-
const string &GetTemporaryDirectory() final
|
75
|
+
const string &GetTemporaryDirectory() const final {
|
76
76
|
return temp_directory;
|
77
77
|
}
|
78
78
|
|
79
|
-
void SetTemporaryDirectory(const string &new_dir) final
|
79
|
+
void SetTemporaryDirectory(const string &new_dir) final;
|
80
80
|
|
81
|
-
DUCKDB_API Allocator &GetBufferAllocator() final
|
81
|
+
DUCKDB_API Allocator &GetBufferAllocator() final;
|
82
82
|
|
83
|
-
DatabaseInstance &GetDatabase()
|
83
|
+
DatabaseInstance &GetDatabase() {
|
84
84
|
return db;
|
85
85
|
}
|
86
86
|
|
@@ -88,9 +88,9 @@ public:
|
|
88
88
|
unique_ptr<FileBuffer> ConstructManagedBuffer(idx_t size, unique_ptr<FileBuffer> &&source,
|
89
89
|
FileBufferType type = FileBufferType::MANAGED_BUFFER) override;
|
90
90
|
|
91
|
-
DUCKDB_API void ReserveMemory(idx_t size) final
|
92
|
-
DUCKDB_API void FreeReservedMemory(idx_t size) final
|
93
|
-
bool HasTemporaryDirectory() const final
|
91
|
+
DUCKDB_API void ReserveMemory(idx_t size) final;
|
92
|
+
DUCKDB_API void FreeReservedMemory(idx_t size) final;
|
93
|
+
bool HasTemporaryDirectory() const final;
|
94
94
|
|
95
95
|
protected:
|
96
96
|
//! Helper
|
@@ -106,24 +106,24 @@ protected:
|
|
106
106
|
shared_ptr<BlockHandle> RegisterMemory(MemoryTag tag, idx_t block_size, bool can_destroy);
|
107
107
|
|
108
108
|
//! Garbage collect eviction queue
|
109
|
-
void PurgeQueue() final
|
109
|
+
void PurgeQueue() final;
|
110
110
|
|
111
|
-
BufferPool &GetBufferPool() const final
|
112
|
-
TemporaryMemoryManager &GetTemporaryMemoryManager() final
|
111
|
+
BufferPool &GetBufferPool() const final;
|
112
|
+
TemporaryMemoryManager &GetTemporaryMemoryManager() final;
|
113
113
|
|
114
114
|
//! Write a temporary buffer to disk
|
115
|
-
void WriteTemporaryBuffer(MemoryTag tag, block_id_t block_id, FileBuffer &buffer) final
|
115
|
+
void WriteTemporaryBuffer(MemoryTag tag, block_id_t block_id, FileBuffer &buffer) final;
|
116
116
|
//! Read a temporary buffer from disk
|
117
117
|
unique_ptr<FileBuffer> ReadTemporaryBuffer(MemoryTag tag, block_id_t id,
|
118
|
-
unique_ptr<FileBuffer> buffer = nullptr) final
|
118
|
+
unique_ptr<FileBuffer> buffer = nullptr) final;
|
119
119
|
//! Get the path of the temporary buffer
|
120
120
|
string GetTemporaryPath(block_id_t id);
|
121
121
|
|
122
|
-
void DeleteTemporaryFile(block_id_t id) final
|
122
|
+
void DeleteTemporaryFile(block_id_t id) final;
|
123
123
|
|
124
124
|
void RequireTemporaryDirectory();
|
125
125
|
|
126
|
-
void AddToEvictionQueue(shared_ptr<BlockHandle> &handle) final
|
126
|
+
void AddToEvictionQueue(shared_ptr<BlockHandle> &handle) final;
|
127
127
|
|
128
128
|
const char *InMemoryWarning();
|
129
129
|
|
@@ -27,9 +27,9 @@ struct NumericValueUnion {
|
|
27
27
|
uint64_t ubigint;
|
28
28
|
hugeint_t hugeint;
|
29
29
|
uhugeint_t uhugeint;
|
30
|
-
float float_;
|
31
|
-
double double_;
|
32
|
-
} value_;
|
30
|
+
float float_; // NOLINT
|
31
|
+
double double_; // NOLINT
|
32
|
+
} value_; // NOLINT
|
33
33
|
|
34
34
|
template <class T>
|
35
35
|
T &GetReferenceUnsafe();
|
@@ -16,8 +16,8 @@ namespace duckdb {
|
|
16
16
|
|
17
17
|
class SegmentStatistics {
|
18
18
|
public:
|
19
|
-
SegmentStatistics(LogicalType type);
|
20
|
-
SegmentStatistics(BaseStatistics statistics);
|
19
|
+
explicit SegmentStatistics(LogicalType type);
|
20
|
+
explicit SegmentStatistics(BaseStatistics statistics);
|
21
21
|
|
22
22
|
//! Type-specific statistics of the segment
|
23
23
|
BaseStatistics statistics;
|
@@ -66,10 +66,10 @@ struct MainHeader {
|
|
66
66
|
static void CheckMagicBytes(FileHandle &handle);
|
67
67
|
|
68
68
|
string LibraryGitDesc() {
|
69
|
-
return string((
|
69
|
+
return string(char_ptr_cast(library_git_desc), 0, MAX_VERSION_SIZE);
|
70
70
|
}
|
71
71
|
string LibraryGitHash() {
|
72
|
-
return string((
|
72
|
+
return string(char_ptr_cast(library_git_hash), 0, MAX_VERSION_SIZE);
|
73
73
|
}
|
74
74
|
|
75
75
|
void Write(WriteStream &ser);
|
@@ -46,7 +46,7 @@ public:
|
|
46
46
|
static StorageManager &Get(Catalog &catalog);
|
47
47
|
|
48
48
|
//! Initialize a database or load an existing database from the given path
|
49
|
-
void Initialize();
|
49
|
+
void Initialize(optional_ptr<ClientContext> context);
|
50
50
|
|
51
51
|
DatabaseInstance &GetDatabase();
|
52
52
|
AttachedDatabase &GetAttached() {
|
@@ -73,7 +73,7 @@ public:
|
|
73
73
|
virtual shared_ptr<TableIOManager> GetTableIOManager(BoundCreateTableInfo *info) = 0;
|
74
74
|
|
75
75
|
protected:
|
76
|
-
virtual void LoadDatabase() = 0;
|
76
|
+
virtual void LoadDatabase(optional_ptr<ClientContext> context = nullptr) = 0;
|
77
77
|
|
78
78
|
protected:
|
79
79
|
//! The database this storage manager belongs to
|
@@ -96,7 +96,7 @@ public:
|
|
96
96
|
}
|
97
97
|
template <class TARGET>
|
98
98
|
const TARGET &Cast() const {
|
99
|
-
|
99
|
+
DynamicCastCheck<TARGET>(this);
|
100
100
|
return reinterpret_cast<const TARGET &>(*this);
|
101
101
|
}
|
102
102
|
};
|
@@ -121,6 +121,6 @@ public:
|
|
121
121
|
shared_ptr<TableIOManager> GetTableIOManager(BoundCreateTableInfo *info) override;
|
122
122
|
|
123
123
|
protected:
|
124
|
-
void LoadDatabase() override;
|
124
|
+
void LoadDatabase(optional_ptr<ClientContext> context = nullptr) override;
|
125
125
|
};
|
126
126
|
} // namespace duckdb
|
@@ -61,6 +61,7 @@ public:
|
|
61
61
|
|
62
62
|
static unique_ptr<CompressionAppendState> StringInitAppend(ColumnSegment &segment) {
|
63
63
|
auto &buffer_manager = BufferManager::GetBufferManager(segment.db);
|
64
|
+
// This block was initialized in StringInitSegment
|
64
65
|
auto handle = buffer_manager.Pin(segment.block);
|
65
66
|
return make_uniq<CompressionAppendState>(std::move(handle));
|
66
67
|
}
|
@@ -82,9 +83,9 @@ public:
|
|
82
83
|
D_ASSERT(segment.GetBlockOffset() == 0);
|
83
84
|
auto handle_ptr = handle.Ptr();
|
84
85
|
auto source_data = UnifiedVectorFormat::GetData<string_t>(data);
|
85
|
-
auto result_data =
|
86
|
-
|
87
|
-
|
86
|
+
auto result_data = reinterpret_cast<int32_t *>(handle_ptr + DICTIONARY_HEADER_SIZE);
|
87
|
+
auto dictionary_size = reinterpret_cast<uint32_t *>(handle_ptr);
|
88
|
+
auto dictionary_end = reinterpret_cast<uint32_t *>(handle_ptr + sizeof(uint32_t));
|
88
89
|
|
89
90
|
idx_t remaining_space = RemainingSpace(segment, handle);
|
90
91
|
auto base_count = segment.count.load();
|
@@ -136,18 +137,19 @@ public:
|
|
136
137
|
if (DUCKDB_UNLIKELY(use_overflow_block)) {
|
137
138
|
// write to overflow blocks
|
138
139
|
block_id_t block;
|
139
|
-
int32_t
|
140
|
+
int32_t current_offset;
|
140
141
|
// write the string into the current string block
|
141
|
-
WriteString(segment, source_data[source_idx], block,
|
142
|
+
WriteString(segment, source_data[source_idx], block, current_offset);
|
142
143
|
*dictionary_size += BIG_STRING_MARKER_SIZE;
|
143
144
|
remaining_space -= BIG_STRING_MARKER_SIZE;
|
144
145
|
auto dict_pos = end - *dictionary_size;
|
145
146
|
|
146
147
|
// write a big string marker into the dictionary
|
147
|
-
WriteStringMarker(dict_pos, block,
|
148
|
+
WriteStringMarker(dict_pos, block, current_offset);
|
148
149
|
|
149
150
|
// place the dictionary offset into the set of vectors
|
150
151
|
// note: for overflow strings we write negative value
|
152
|
+
D_ASSERT(*dictionary_size <= int32_t(Storage::BLOCK_SIZE));
|
151
153
|
result_data[target_idx] = -(*dictionary_size);
|
152
154
|
} else {
|
153
155
|
// string fits in block, append to dictionary and increment dictionary position
|
@@ -159,6 +161,7 @@ public:
|
|
159
161
|
memcpy(dict_pos, source_data[source_idx].GetData(), string_length);
|
160
162
|
|
161
163
|
// place the dictionary offset into the set of vectors
|
164
|
+
D_ASSERT(*dictionary_size <= int32_t(Storage::BLOCK_SIZE));
|
162
165
|
result_data[target_idx] = *dictionary_size;
|
163
166
|
}
|
164
167
|
D_ASSERT(RemainingSpace(segment, handle) <= Storage::BLOCK_SIZE);
|
@@ -17,7 +17,7 @@ class RowGroup;
|
|
17
17
|
struct SelectionVector;
|
18
18
|
class Transaction;
|
19
19
|
struct TransactionData;
|
20
|
-
|
20
|
+
struct DeleteInfo;
|
21
21
|
class Serializer;
|
22
22
|
class Deserializer;
|
23
23
|
|
@@ -132,7 +132,7 @@ public:
|
|
132
132
|
//! Note that "rows" is written to to reflect the row ids that were actually deleted
|
133
133
|
//! i.e. after calling this function, rows will hold [0..actual_delete_count] row ids of the actually deleted tuples
|
134
134
|
idx_t Delete(transaction_t transaction_id, row_t rows[], idx_t count);
|
135
|
-
void CommitDelete(transaction_t commit_id,
|
135
|
+
void CommitDelete(transaction_t commit_id, const DeleteInfo &info);
|
136
136
|
|
137
137
|
bool HasDeletes() const override;
|
138
138
|
|
@@ -75,6 +75,8 @@ public:
|
|
75
75
|
virtual void SetStart(idx_t new_start);
|
76
76
|
//! The root type of the column
|
77
77
|
const LogicalType &RootType() const;
|
78
|
+
//! Whether or not the column has any updates
|
79
|
+
virtual bool HasUpdates() const;
|
78
80
|
|
79
81
|
//! Initialize a scan of the column
|
80
82
|
virtual void InitializeScan(ColumnScanState &state);
|
@@ -159,11 +161,18 @@ protected:
|
|
159
161
|
template <bool SCAN_COMMITTED, bool ALLOW_UPDATES>
|
160
162
|
idx_t ScanVector(TransactionData transaction, idx_t vector_index, ColumnScanState &state, Vector &result);
|
161
163
|
|
164
|
+
void ClearUpdates();
|
165
|
+
void FetchUpdates(TransactionData transaction, idx_t vector_index, Vector &result, idx_t scan_count,
|
166
|
+
bool allow_updates, bool scan_committed);
|
167
|
+
void FetchUpdateRow(TransactionData transaction, row_t row_id, Vector &result, idx_t result_idx);
|
168
|
+
void UpdateInternal(TransactionData transaction, idx_t column_index, Vector &update_vector, row_t *row_ids,
|
169
|
+
idx_t update_count, Vector &base_vector);
|
170
|
+
|
162
171
|
protected:
|
163
172
|
//! The segments holding the data of this column segment
|
164
173
|
ColumnSegmentTree data;
|
165
174
|
//! The lock for the updates
|
166
|
-
mutex update_lock;
|
175
|
+
mutable mutex update_lock;
|
167
176
|
//! The updates for this column segment
|
168
177
|
unique_ptr<UpdateSegment> updates;
|
169
178
|
//! The stats of the root segment
|
@@ -19,8 +19,9 @@ class TableIOManager;
|
|
19
19
|
struct DataTableInfo {
|
20
20
|
DataTableInfo(AttachedDatabase &db, shared_ptr<TableIOManager> table_io_manager_p, string schema, string table);
|
21
21
|
|
22
|
-
//! Initialize any unknown indexes whose types might now be present after an extension load
|
23
|
-
|
22
|
+
//! Initialize any unknown indexes whose types might now be present after an extension load, optionally throwing an
|
23
|
+
//! exception if an index can't be initialized
|
24
|
+
void InitializeIndexes(ClientContext &context, bool throw_on_failure = false);
|
24
25
|
|
25
26
|
//! The database instance of the table
|
26
27
|
AttachedDatabase &db;
|
@@ -54,7 +54,7 @@ public:
|
|
54
54
|
|
55
55
|
public:
|
56
56
|
RowGroup(RowGroupCollection &collection, idx_t start, idx_t count);
|
57
|
-
RowGroup(RowGroupCollection &collection, RowGroupPointer
|
57
|
+
RowGroup(RowGroupCollection &collection, RowGroupPointer pointer);
|
58
58
|
~RowGroup();
|
59
59
|
|
60
60
|
private:
|
@@ -18,7 +18,7 @@ class MetadataReader;
|
|
18
18
|
|
19
19
|
class RowGroupSegmentTree : public SegmentTree<RowGroup, true> {
|
20
20
|
public:
|
21
|
-
RowGroupSegmentTree(RowGroupCollection &collection);
|
21
|
+
explicit RowGroupSegmentTree(RowGroupCollection &collection);
|
22
22
|
~RowGroupSegmentTree() override;
|
23
23
|
|
24
24
|
void Initialize(PersistentTableData &data);
|