duckdb 0.10.2-dev0.0 → 0.10.2-dev3.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 +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
|
@@ -13,31 +13,33 @@
|
|
|
13
13
|
|
|
14
14
|
namespace duckdb {
|
|
15
15
|
|
|
16
|
+
// NOLINTBEGIN
|
|
17
|
+
|
|
16
18
|
struct UDFWrapper {
|
|
17
19
|
public:
|
|
18
|
-
template <typename TR, typename...
|
|
19
|
-
inline static scalar_function_t CreateScalarFunction(const string &name, TR (*udf_func)(
|
|
20
|
-
const std::size_t num_template_argc = sizeof...(
|
|
20
|
+
template <typename TR, typename... ARGS>
|
|
21
|
+
inline static scalar_function_t CreateScalarFunction(const string &name, TR (*udf_func)(ARGS...)) {
|
|
22
|
+
const std::size_t num_template_argc = sizeof...(ARGS);
|
|
21
23
|
switch (num_template_argc) {
|
|
22
24
|
case 1:
|
|
23
|
-
return CreateUnaryFunction<TR,
|
|
25
|
+
return CreateUnaryFunction<TR, ARGS...>(name, udf_func);
|
|
24
26
|
case 2:
|
|
25
|
-
return CreateBinaryFunction<TR,
|
|
27
|
+
return CreateBinaryFunction<TR, ARGS...>(name, udf_func);
|
|
26
28
|
case 3:
|
|
27
|
-
return CreateTernaryFunction<TR,
|
|
29
|
+
return CreateTernaryFunction<TR, ARGS...>(name, udf_func);
|
|
28
30
|
default: // LCOV_EXCL_START
|
|
29
31
|
throw std::runtime_error("UDF function only supported until ternary!");
|
|
30
32
|
} // LCOV_EXCL_STOP
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
template <typename TR, typename...
|
|
34
|
-
inline static scalar_function_t CreateScalarFunction(const string &name, vector<LogicalType> args,
|
|
35
|
-
LogicalType ret_type, TR (*udf_func)(
|
|
35
|
+
template <typename TR, typename... ARGS>
|
|
36
|
+
inline static scalar_function_t CreateScalarFunction(const string &name, const vector<LogicalType> &args,
|
|
37
|
+
const LogicalType &ret_type, TR (*udf_func)(ARGS...)) {
|
|
36
38
|
if (!TypesMatch<TR>(ret_type)) { // LCOV_EXCL_START
|
|
37
39
|
throw std::runtime_error("Return type doesn't match with the first template type.");
|
|
38
40
|
} // LCOV_EXCL_STOP
|
|
39
41
|
|
|
40
|
-
const std::size_t num_template_types = sizeof...(
|
|
42
|
+
const std::size_t num_template_types = sizeof...(ARGS);
|
|
41
43
|
if (num_template_types != args.size()) { // LCOV_EXCL_START
|
|
42
44
|
throw std::runtime_error(
|
|
43
45
|
"The number of templated types should be the same quantity of the LogicalType arguments.");
|
|
@@ -45,25 +47,25 @@ public:
|
|
|
45
47
|
|
|
46
48
|
switch (num_template_types) {
|
|
47
49
|
case 1:
|
|
48
|
-
return CreateUnaryFunction<TR,
|
|
50
|
+
return CreateUnaryFunction<TR, ARGS...>(name, args, ret_type, udf_func);
|
|
49
51
|
case 2:
|
|
50
|
-
return CreateBinaryFunction<TR,
|
|
52
|
+
return CreateBinaryFunction<TR, ARGS...>(name, args, ret_type, udf_func);
|
|
51
53
|
case 3:
|
|
52
|
-
return CreateTernaryFunction<TR,
|
|
54
|
+
return CreateTernaryFunction<TR, ARGS...>(name, args, ret_type, udf_func);
|
|
53
55
|
default: // LCOV_EXCL_START
|
|
54
56
|
throw std::runtime_error("UDF function only supported until ternary!");
|
|
55
57
|
} // LCOV_EXCL_STOP
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
template <typename TR, typename...
|
|
60
|
+
template <typename TR, typename... ARGS>
|
|
59
61
|
inline static void RegisterFunction(const string &name, scalar_function_t udf_function, ClientContext &context,
|
|
60
62
|
LogicalType varargs = LogicalType(LogicalTypeId::INVALID)) {
|
|
61
63
|
vector<LogicalType> arguments;
|
|
62
|
-
GetArgumentTypesRecursive<
|
|
64
|
+
GetArgumentTypesRecursive<ARGS...>(arguments);
|
|
63
65
|
|
|
64
66
|
LogicalType ret_type = GetArgumentType<TR>();
|
|
65
67
|
|
|
66
|
-
RegisterFunction(name, arguments, ret_type, udf_function, context, varargs);
|
|
68
|
+
RegisterFunction(name, arguments, ret_type, std::move(udf_function), context, std::move(varargs));
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
static void RegisterFunction(string name, vector<LogicalType> args, LogicalType ret_type,
|
|
@@ -82,8 +84,8 @@ public:
|
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
template <typename UDF_OP, typename STATE, typename TR, typename TA>
|
|
85
|
-
inline static AggregateFunction CreateAggregateFunction(const string &name, LogicalType ret_type,
|
|
86
|
-
LogicalType input_type) {
|
|
87
|
+
inline static AggregateFunction CreateAggregateFunction(const string &name, const LogicalType &ret_type,
|
|
88
|
+
const LogicalType &input_type) {
|
|
87
89
|
if (!TypesMatch<TR>(ret_type)) { // LCOV_EXCL_START
|
|
88
90
|
throw std::runtime_error("The return argument don't match!");
|
|
89
91
|
} // LCOV_EXCL_STOP
|
|
@@ -96,33 +98,34 @@ public:
|
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
template <typename UDF_OP, typename STATE, typename TR, typename TA, typename TB>
|
|
99
|
-
inline static AggregateFunction CreateAggregateFunction(const string &name, LogicalType ret_type,
|
|
100
|
-
LogicalType
|
|
101
|
+
inline static AggregateFunction CreateAggregateFunction(const string &name, const LogicalType &ret_type,
|
|
102
|
+
const LogicalType &input_type_a,
|
|
103
|
+
const LogicalType &input_type_b) {
|
|
101
104
|
if (!TypesMatch<TR>(ret_type)) { // LCOV_EXCL_START
|
|
102
105
|
throw std::runtime_error("The return argument don't match!");
|
|
103
106
|
}
|
|
104
107
|
|
|
105
|
-
if (!TypesMatch<TA>(
|
|
108
|
+
if (!TypesMatch<TA>(input_type_a)) {
|
|
106
109
|
throw std::runtime_error("The first input argument don't match!");
|
|
107
110
|
}
|
|
108
111
|
|
|
109
|
-
if (!TypesMatch<TB>(
|
|
112
|
+
if (!TypesMatch<TB>(input_type_b)) {
|
|
110
113
|
throw std::runtime_error("The second input argument don't match!");
|
|
111
114
|
} // LCOV_EXCL_STOP
|
|
112
115
|
|
|
113
|
-
return CreateBinaryAggregateFunction<UDF_OP, STATE, TR, TA, TB>(name, ret_type,
|
|
116
|
+
return CreateBinaryAggregateFunction<UDF_OP, STATE, TR, TA, TB>(name, ret_type, input_type_a, input_type_b);
|
|
114
117
|
}
|
|
115
118
|
|
|
116
119
|
//! A generic CreateAggregateFunction ---------------------------------------------------------------------------//
|
|
117
120
|
inline static AggregateFunction
|
|
118
|
-
CreateAggregateFunction(string name, vector<LogicalType> arguments, LogicalType return_type,
|
|
121
|
+
CreateAggregateFunction(const string &name, const vector<LogicalType> &arguments, const LogicalType &return_type,
|
|
119
122
|
aggregate_size_t state_size, aggregate_initialize_t initialize, aggregate_update_t update,
|
|
120
123
|
aggregate_combine_t combine, aggregate_finalize_t finalize,
|
|
121
124
|
aggregate_simple_update_t simple_update = nullptr, bind_aggregate_function_t bind = nullptr,
|
|
122
125
|
aggregate_destructor_t destructor = nullptr) {
|
|
123
126
|
|
|
124
|
-
AggregateFunction aggr_function(
|
|
125
|
-
|
|
127
|
+
AggregateFunction aggr_function(name, arguments, return_type, state_size, initialize, update, combine, finalize,
|
|
128
|
+
simple_update, bind, destructor);
|
|
126
129
|
aggr_function.null_handling = FunctionNullHandling::SPECIAL_HANDLING;
|
|
127
130
|
return aggr_function;
|
|
128
131
|
}
|
|
@@ -167,21 +170,21 @@ private:
|
|
|
167
170
|
return udf_function;
|
|
168
171
|
}
|
|
169
172
|
|
|
170
|
-
template <typename TR, typename...
|
|
173
|
+
template <typename TR, typename... ARGS>
|
|
171
174
|
inline static scalar_function_t CreateUnaryFunction(const string &name,
|
|
172
|
-
TR (*udf_func)(
|
|
175
|
+
TR (*udf_func)(ARGS...)) { // LCOV_EXCL_START
|
|
173
176
|
throw std::runtime_error("Incorrect number of arguments for unary function");
|
|
174
177
|
} // LCOV_EXCL_STOP
|
|
175
178
|
|
|
176
|
-
template <typename TR, typename...
|
|
179
|
+
template <typename TR, typename... ARGS>
|
|
177
180
|
inline static scalar_function_t CreateBinaryFunction(const string &name,
|
|
178
|
-
TR (*udf_func)(
|
|
181
|
+
TR (*udf_func)(ARGS...)) { // LCOV_EXCL_START
|
|
179
182
|
throw std::runtime_error("Incorrect number of arguments for binary function");
|
|
180
183
|
} // LCOV_EXCL_STOP
|
|
181
184
|
|
|
182
|
-
template <typename TR, typename...
|
|
185
|
+
template <typename TR, typename... ARGS>
|
|
183
186
|
inline static scalar_function_t CreateTernaryFunction(const string &name,
|
|
184
|
-
TR (*udf_func)(
|
|
187
|
+
TR (*udf_func)(ARGS...)) { // LCOV_EXCL_START
|
|
185
188
|
throw std::runtime_error("Incorrect number of arguments for ternary function");
|
|
186
189
|
} // LCOV_EXCL_STOP
|
|
187
190
|
|
|
@@ -208,10 +211,10 @@ private:
|
|
|
208
211
|
} // LCOV_EXCL_STOP
|
|
209
212
|
}
|
|
210
213
|
|
|
211
|
-
template <typename TA, typename TB, typename...
|
|
214
|
+
template <typename TA, typename TB, typename... ARGS>
|
|
212
215
|
inline static void GetArgumentTypesRecursive(vector<LogicalType> &arguments) {
|
|
213
216
|
arguments.push_back(GetArgumentType<TA>());
|
|
214
|
-
GetArgumentTypesRecursive<TB,
|
|
217
|
+
GetArgumentTypesRecursive<TB, ARGS...>(arguments);
|
|
215
218
|
}
|
|
216
219
|
|
|
217
220
|
template <typename TA>
|
|
@@ -222,16 +225,16 @@ private:
|
|
|
222
225
|
private:
|
|
223
226
|
//-------------------------------- Argumented functions --------------------------------//
|
|
224
227
|
|
|
225
|
-
template <typename TR, typename...
|
|
226
|
-
inline static scalar_function_t CreateUnaryFunction(const string &name, vector<LogicalType> args,
|
|
227
|
-
LogicalType ret_type,
|
|
228
|
-
TR (*udf_func)(
|
|
228
|
+
template <typename TR, typename... ARGS>
|
|
229
|
+
inline static scalar_function_t CreateUnaryFunction(const string &name, const vector<LogicalType> &args,
|
|
230
|
+
const LogicalType &ret_type,
|
|
231
|
+
TR (*udf_func)(ARGS...)) { // LCOV_EXCL_START
|
|
229
232
|
throw std::runtime_error("Incorrect number of arguments for unary function");
|
|
230
233
|
} // LCOV_EXCL_STOP
|
|
231
234
|
|
|
232
235
|
template <typename TR, typename TA>
|
|
233
|
-
inline static scalar_function_t CreateUnaryFunction(const string &name, vector<LogicalType> args,
|
|
234
|
-
LogicalType ret_type, TR (*udf_func)(TA)) {
|
|
236
|
+
inline static scalar_function_t CreateUnaryFunction(const string &name, const vector<LogicalType> &args,
|
|
237
|
+
const LogicalType &ret_type, TR (*udf_func)(TA)) {
|
|
235
238
|
if (args.size() != 1) { // LCOV_EXCL_START
|
|
236
239
|
throw std::runtime_error("The number of LogicalType arguments (\"args\") should be 1!");
|
|
237
240
|
}
|
|
@@ -246,16 +249,16 @@ private:
|
|
|
246
249
|
return udf_function;
|
|
247
250
|
}
|
|
248
251
|
|
|
249
|
-
template <typename TR, typename...
|
|
250
|
-
inline static scalar_function_t CreateBinaryFunction(const string &name, vector<LogicalType> args,
|
|
251
|
-
LogicalType ret_type,
|
|
252
|
-
TR (*udf_func)(
|
|
252
|
+
template <typename TR, typename... ARGS>
|
|
253
|
+
inline static scalar_function_t CreateBinaryFunction(const string &name, const vector<LogicalType> &args,
|
|
254
|
+
const LogicalType &ret_type,
|
|
255
|
+
TR (*udf_func)(ARGS...)) { // LCOV_EXCL_START
|
|
253
256
|
throw std::runtime_error("Incorrect number of arguments for binary function");
|
|
254
257
|
} // LCOV_EXCL_STOP
|
|
255
258
|
|
|
256
259
|
template <typename TR, typename TA, typename TB>
|
|
257
|
-
inline static scalar_function_t CreateBinaryFunction(const string &name, vector<LogicalType> args,
|
|
258
|
-
LogicalType ret_type, TR (*udf_func)(TA, TB)) {
|
|
260
|
+
inline static scalar_function_t CreateBinaryFunction(const string &name, const vector<LogicalType> &args,
|
|
261
|
+
const LogicalType &ret_type, TR (*udf_func)(TA, TB)) {
|
|
259
262
|
if (args.size() != 2) { // LCOV_EXCL_START
|
|
260
263
|
throw std::runtime_error("The number of LogicalType arguments (\"args\") should be 2!");
|
|
261
264
|
}
|
|
@@ -272,16 +275,16 @@ private:
|
|
|
272
275
|
return udf_function;
|
|
273
276
|
}
|
|
274
277
|
|
|
275
|
-
template <typename TR, typename...
|
|
276
|
-
inline static scalar_function_t CreateTernaryFunction(const string &name, vector<LogicalType> args,
|
|
277
|
-
LogicalType ret_type,
|
|
278
|
-
TR (*udf_func)(
|
|
278
|
+
template <typename TR, typename... ARGS>
|
|
279
|
+
inline static scalar_function_t CreateTernaryFunction(const string &name, const vector<LogicalType> &args,
|
|
280
|
+
const LogicalType &ret_type,
|
|
281
|
+
TR (*udf_func)(ARGS...)) { // LCOV_EXCL_START
|
|
279
282
|
throw std::runtime_error("Incorrect number of arguments for ternary function");
|
|
280
283
|
} // LCOV_EXCL_STOP
|
|
281
284
|
|
|
282
285
|
template <typename TR, typename TA, typename TB, typename TC>
|
|
283
|
-
inline static scalar_function_t CreateTernaryFunction(const string &name, vector<LogicalType> args,
|
|
284
|
-
LogicalType ret_type, TR (*udf_func)(TA, TB, TC)) {
|
|
286
|
+
inline static scalar_function_t CreateTernaryFunction(const string &name, const vector<LogicalType> &args,
|
|
287
|
+
const LogicalType &ret_type, TR (*udf_func)(TA, TB, TC)) {
|
|
285
288
|
if (args.size() != 3) { // LCOV_EXCL_START
|
|
286
289
|
throw std::runtime_error("The number of LogicalType arguments (\"args\") should be 3!");
|
|
287
290
|
}
|
|
@@ -350,8 +353,8 @@ private:
|
|
|
350
353
|
}
|
|
351
354
|
|
|
352
355
|
template <typename UDF_OP, typename STATE, typename TR, typename TA>
|
|
353
|
-
inline static AggregateFunction CreateUnaryAggregateFunction(const string &name, LogicalType ret_type,
|
|
354
|
-
LogicalType input_type) {
|
|
356
|
+
inline static AggregateFunction CreateUnaryAggregateFunction(const string &name, const LogicalType &ret_type,
|
|
357
|
+
const LogicalType &input_type) {
|
|
355
358
|
AggregateFunction aggr_function =
|
|
356
359
|
AggregateFunction::UnaryAggregate<STATE, TR, TA, UDF_OP>(input_type, ret_type);
|
|
357
360
|
aggr_function.name = name;
|
|
@@ -361,19 +364,22 @@ private:
|
|
|
361
364
|
template <typename UDF_OP, typename STATE, typename TR, typename TA, typename TB>
|
|
362
365
|
inline static AggregateFunction CreateBinaryAggregateFunction(const string &name) {
|
|
363
366
|
LogicalType return_type = GetArgumentType<TR>();
|
|
364
|
-
LogicalType
|
|
365
|
-
LogicalType
|
|
366
|
-
return CreateBinaryAggregateFunction<UDF_OP, STATE, TR, TA, TB>(name, return_type,
|
|
367
|
+
LogicalType input_type_a = GetArgumentType<TA>();
|
|
368
|
+
LogicalType input_type_b = GetArgumentType<TB>();
|
|
369
|
+
return CreateBinaryAggregateFunction<UDF_OP, STATE, TR, TA, TB>(name, return_type, input_type_a, input_type_b);
|
|
367
370
|
}
|
|
368
371
|
|
|
369
372
|
template <typename UDF_OP, typename STATE, typename TR, typename TA, typename TB>
|
|
370
|
-
inline static AggregateFunction CreateBinaryAggregateFunction(const string &name, LogicalType ret_type,
|
|
371
|
-
LogicalType
|
|
373
|
+
inline static AggregateFunction CreateBinaryAggregateFunction(const string &name, const LogicalType &ret_type,
|
|
374
|
+
const LogicalType &input_type_a,
|
|
375
|
+
const LogicalType &input_type_b) {
|
|
372
376
|
AggregateFunction aggr_function =
|
|
373
|
-
AggregateFunction::BinaryAggregate<STATE, TA, TB, TR, UDF_OP>(
|
|
377
|
+
AggregateFunction::BinaryAggregate<STATE, TA, TB, TR, UDF_OP>(input_type_a, input_type_b, ret_type);
|
|
374
378
|
aggr_function.name = name;
|
|
375
379
|
return aggr_function;
|
|
376
380
|
}
|
|
377
381
|
}; // end UDFWrapper
|
|
378
382
|
|
|
383
|
+
// NOLINTEND
|
|
384
|
+
|
|
379
385
|
} // namespace duckdb
|
|
@@ -29,7 +29,7 @@ enum class AppenderType : uint8_t {
|
|
|
29
29
|
class BaseAppender {
|
|
30
30
|
protected:
|
|
31
31
|
//! The amount of tuples that will be gathered in the column data collection before flushing
|
|
32
|
-
static constexpr const idx_t FLUSH_COUNT = STANDARD_VECTOR_SIZE *
|
|
32
|
+
static constexpr const idx_t FLUSH_COUNT = STANDARD_VECTOR_SIZE * 100ULL;
|
|
33
33
|
|
|
34
34
|
Allocator &allocator;
|
|
35
35
|
//! The append types
|
|
@@ -66,8 +66,8 @@ public:
|
|
|
66
66
|
DUCKDB_API void Append(const char *value, uint32_t length);
|
|
67
67
|
|
|
68
68
|
// prepared statements
|
|
69
|
-
template <typename...
|
|
70
|
-
void AppendRow(
|
|
69
|
+
template <typename... ARGS>
|
|
70
|
+
void AppendRow(ARGS... args) {
|
|
71
71
|
BeginRow();
|
|
72
72
|
AppendRowRecursive(args...);
|
|
73
73
|
}
|
|
@@ -80,7 +80,7 @@ public:
|
|
|
80
80
|
vector<LogicalType> &GetTypes() {
|
|
81
81
|
return types;
|
|
82
82
|
}
|
|
83
|
-
idx_t CurrentColumn() {
|
|
83
|
+
idx_t CurrentColumn() const {
|
|
84
84
|
return column;
|
|
85
85
|
}
|
|
86
86
|
DUCKDB_API void AppendDataChunk(DataChunk &value);
|
|
@@ -102,8 +102,8 @@ protected:
|
|
|
102
102
|
EndRow();
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
template <typename T, typename...
|
|
106
|
-
void AppendRowRecursive(T value,
|
|
105
|
+
template <typename T, typename... ARGS>
|
|
106
|
+
void AppendRowRecursive(T value, ARGS... args) {
|
|
107
107
|
Append<T>(value);
|
|
108
108
|
AppendRowRecursive(args...);
|
|
109
109
|
}
|
|
@@ -43,10 +43,11 @@ public:
|
|
|
43
43
|
const AttachInfo &info, AccessMode access_mode);
|
|
44
44
|
~AttachedDatabase() override;
|
|
45
45
|
|
|
46
|
-
void Initialize();
|
|
46
|
+
void Initialize(optional_ptr<ClientContext> context = nullptr);
|
|
47
47
|
void Close();
|
|
48
48
|
|
|
49
49
|
Catalog &ParentCatalog() override;
|
|
50
|
+
const Catalog &ParentCatalog() const override;
|
|
50
51
|
StorageManager &GetStorageManager();
|
|
51
52
|
Catalog &GetCatalog();
|
|
52
53
|
TransactionManager &GetTransactionManager();
|
|
@@ -61,6 +62,7 @@ public:
|
|
|
61
62
|
bool IsReadOnly() const;
|
|
62
63
|
bool IsInitialDatabase() const;
|
|
63
64
|
void SetInitialDatabase();
|
|
65
|
+
void SetReadOnlyDatabase();
|
|
64
66
|
|
|
65
67
|
static bool NameIsReserved(const string &name);
|
|
66
68
|
static string ExtractDatabaseName(const string &dbpath, FileSystem &fs);
|
|
@@ -23,7 +23,7 @@ class ClientContextLock;
|
|
|
23
23
|
|
|
24
24
|
struct BlockedSink {
|
|
25
25
|
public:
|
|
26
|
-
BlockedSink(InterruptState state, idx_t chunk_size) : state(state), chunk_size(chunk_size) {
|
|
26
|
+
BlockedSink(InterruptState state, idx_t chunk_size) : state(std::move(state)), chunk_size(chunk_size) {
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
public:
|
|
@@ -38,7 +38,7 @@ protected:
|
|
|
38
38
|
enum class Type { SIMPLE };
|
|
39
39
|
|
|
40
40
|
public:
|
|
41
|
-
BufferedData(Type type, weak_ptr<ClientContext> context) : type(type), context(context) {
|
|
41
|
+
BufferedData(Type type, weak_ptr<ClientContext> context) : type(type), context(std::move(context)) {
|
|
42
42
|
}
|
|
43
43
|
virtual ~BufferedData() {
|
|
44
44
|
}
|
|
@@ -75,8 +75,8 @@ struct DuckDBResultData {
|
|
|
75
75
|
duckdb_type ConvertCPPTypeToC(const LogicalType &type);
|
|
76
76
|
LogicalTypeId ConvertCTypeToCPP(duckdb_type c_type);
|
|
77
77
|
idx_t GetCTypeSize(duckdb_type type);
|
|
78
|
-
duckdb_state
|
|
79
|
-
bool
|
|
78
|
+
duckdb_state DuckDBTranslateResult(unique_ptr<QueryResult> result, duckdb_result *out);
|
|
79
|
+
bool DeprecatedMaterializeResult(duckdb_result *result);
|
|
80
80
|
duckdb_statement_type StatementTypeToC(duckdb::StatementType statement_type);
|
|
81
81
|
|
|
82
82
|
} // namespace duckdb
|
|
@@ -9,8 +9,8 @@ class QueryResult;
|
|
|
9
9
|
|
|
10
10
|
class QueryResultChunkScanState : public ChunkScanState {
|
|
11
11
|
public:
|
|
12
|
-
QueryResultChunkScanState(QueryResult &result);
|
|
13
|
-
~QueryResultChunkScanState();
|
|
12
|
+
explicit QueryResultChunkScanState(QueryResult &result);
|
|
13
|
+
~QueryResultChunkScanState() override;
|
|
14
14
|
|
|
15
15
|
public:
|
|
16
16
|
bool LoadNextChunk(ErrorData &error) override;
|
|
@@ -167,7 +167,7 @@ public:
|
|
|
167
167
|
bool requires_valid_transaction = true);
|
|
168
168
|
|
|
169
169
|
//! Equivalent to CURRENT_SETTING(key) SQL function.
|
|
170
|
-
DUCKDB_API SettingLookupResult TryGetCurrentSetting(const std::string &key, Value &result);
|
|
170
|
+
DUCKDB_API SettingLookupResult TryGetCurrentSetting(const std::string &key, Value &result) const;
|
|
171
171
|
|
|
172
172
|
//! Returns the parser options for this client context
|
|
173
173
|
DUCKDB_API ParserOptions GetParserOptions() const;
|
|
@@ -24,9 +24,10 @@ public:
|
|
|
24
24
|
SettingLookupResult TryGetCurrentSetting(const string &key, Value &result, FileOpenerInfo &info) override;
|
|
25
25
|
SettingLookupResult TryGetCurrentSetting(const string &key, Value &result) override;
|
|
26
26
|
|
|
27
|
-
ClientContext
|
|
27
|
+
optional_ptr<ClientContext> TryGetClientContext() override {
|
|
28
28
|
return &context;
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
|
+
optional_ptr<DatabaseInstance> TryGetDatabase() override;
|
|
30
31
|
|
|
31
32
|
private:
|
|
32
33
|
ClientContext &context;
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
#include <string>
|
|
12
12
|
|
|
13
13
|
namespace duckdb {
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
enum class ArrowOffsetSize : uint8_t { REGULAR, LARGE };
|
|
15
16
|
|
|
16
17
|
//! A set of properties from the client context that can be used to interpret the query result
|
|
17
18
|
struct ClientProperties {
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
namespace duckdb {
|
|
36
36
|
|
|
37
|
+
class BufferManager;
|
|
37
38
|
class BufferPool;
|
|
38
39
|
class CastFunctionSet;
|
|
39
40
|
class ClientContext;
|
|
@@ -59,7 +60,7 @@ typedef void (*set_global_function_t)(DatabaseInstance *db, DBConfig &config, co
|
|
|
59
60
|
typedef void (*set_local_function_t)(ClientContext &context, const Value ¶meter);
|
|
60
61
|
typedef void (*reset_global_function_t)(DatabaseInstance *db, DBConfig &config);
|
|
61
62
|
typedef void (*reset_local_function_t)(ClientContext &context);
|
|
62
|
-
typedef Value (*get_setting_function_t)(ClientContext &context);
|
|
63
|
+
typedef Value (*get_setting_function_t)(const ClientContext &context);
|
|
63
64
|
|
|
64
65
|
struct ConfigurationOption {
|
|
65
66
|
const char *name;
|
|
@@ -75,6 +76,7 @@ struct ConfigurationOption {
|
|
|
75
76
|
typedef void (*set_option_callback_t)(ClientContext &context, SetScope scope, Value ¶meter);
|
|
76
77
|
|
|
77
78
|
struct ExtensionOption {
|
|
79
|
+
// NOLINTNEXTLINE: work around bug in clang-tidy
|
|
78
80
|
ExtensionOption(string description_p, LogicalType type_p, set_option_callback_t set_function_p,
|
|
79
81
|
Value default_value_p)
|
|
80
82
|
: description(std::move(description_p)), type(std::move(type_p)), set_function(set_function_p),
|
|
@@ -127,6 +129,9 @@ struct DBConfigOptions {
|
|
|
127
129
|
bool use_temporary_directory = true;
|
|
128
130
|
//! Directory to store temporary structures that do not fit in memory
|
|
129
131
|
string temporary_directory;
|
|
132
|
+
//! Whether or not to invoke filesystem trim on free blocks after checkpoint. This will reclaim
|
|
133
|
+
//! space for sparse files, on platforms that support it.
|
|
134
|
+
bool trim_free_blocks = false;
|
|
130
135
|
//! Whether or not to allow printing unredacted secrets
|
|
131
136
|
bool allow_unredacted_secrets = false;
|
|
132
137
|
//! The collation type of the database
|
|
@@ -170,6 +175,8 @@ struct DBConfigOptions {
|
|
|
170
175
|
string extension_directory;
|
|
171
176
|
//! Whether unsigned extensions should be loaded
|
|
172
177
|
bool allow_unsigned_extensions = false;
|
|
178
|
+
//! Whether extensions with missing metadata should be loaded
|
|
179
|
+
bool allow_extensions_metadata_mismatch = false;
|
|
173
180
|
//! Enable emitting FSST Vectors
|
|
174
181
|
bool enable_fsst_vectors = false;
|
|
175
182
|
//! Start transactions immediately in all attached databases - instead of lazily when a database is referenced
|
|
@@ -181,7 +188,7 @@ struct DBConfigOptions {
|
|
|
181
188
|
//! Whether or not the configuration settings can be altered
|
|
182
189
|
bool lock_configuration = false;
|
|
183
190
|
//! Whether to print bindings when printing the plan (debug mode only)
|
|
184
|
-
static bool debug_print_bindings;
|
|
191
|
+
static bool debug_print_bindings; // NOLINT: debug setting
|
|
185
192
|
//! The peak allocation threshold at which to flush the allocator after completing a task (1 << 27, ~128MB)
|
|
186
193
|
idx_t allocator_flush_threshold = 134217728;
|
|
187
194
|
//! DuckDB API surface
|
|
@@ -200,7 +207,7 @@ struct DBConfig {
|
|
|
200
207
|
|
|
201
208
|
public:
|
|
202
209
|
DUCKDB_API DBConfig();
|
|
203
|
-
DUCKDB_API DBConfig(bool read_only);
|
|
210
|
+
explicit DUCKDB_API DBConfig(bool read_only);
|
|
204
211
|
DUCKDB_API DBConfig(const case_insensitive_map_t<Value> &config_dict, bool read_only);
|
|
205
212
|
DUCKDB_API ~DBConfig();
|
|
206
213
|
|
|
@@ -233,6 +240,8 @@ public:
|
|
|
233
240
|
case_insensitive_map_t<duckdb::unique_ptr<StorageExtension>> storage_extensions;
|
|
234
241
|
//! A buffer pool can be shared across multiple databases (if desired).
|
|
235
242
|
shared_ptr<BufferPool> buffer_pool;
|
|
243
|
+
//! Provide a custom buffer manager implementation (if desired).
|
|
244
|
+
shared_ptr<BufferManager> buffer_manager;
|
|
236
245
|
//! Set of callbacks that can be installed by extensions
|
|
237
246
|
vector<unique_ptr<ExtensionCallback>> extension_callbacks;
|
|
238
247
|
|
|
@@ -249,9 +258,9 @@ public:
|
|
|
249
258
|
DUCKDB_API void AddExtensionOption(const string &name, string description, LogicalType parameter,
|
|
250
259
|
const Value &default_value = Value(), set_option_callback_t function = nullptr);
|
|
251
260
|
//! Fetch an option by index. Returns a pointer to the option, or nullptr if out of range
|
|
252
|
-
DUCKDB_API static ConfigurationOption
|
|
261
|
+
DUCKDB_API static optional_ptr<const ConfigurationOption> GetOptionByIndex(idx_t index);
|
|
253
262
|
//! Fetch an option by name. Returns a pointer to the option, or nullptr if none exists.
|
|
254
|
-
DUCKDB_API static ConfigurationOption
|
|
263
|
+
DUCKDB_API static optional_ptr<const ConfigurationOption> GetOptionByName(const string &name);
|
|
255
264
|
DUCKDB_API void SetOption(const ConfigurationOption &option, const Value &value);
|
|
256
265
|
DUCKDB_API void SetOption(DatabaseInstance *db, const ConfigurationOption &option, const Value &value);
|
|
257
266
|
DUCKDB_API void SetOptionByName(const string &name, const Value &value);
|
|
@@ -32,7 +32,7 @@ class LogicalOperator;
|
|
|
32
32
|
class SelectStatement;
|
|
33
33
|
struct CSVReaderOptions;
|
|
34
34
|
|
|
35
|
-
typedef void (*
|
|
35
|
+
typedef void (*warning_callback_t)(std::string);
|
|
36
36
|
|
|
37
37
|
//! A connection to a database. This represents a (client) connection that can
|
|
38
38
|
//! be used to query the database.
|
|
@@ -49,7 +49,7 @@ public:
|
|
|
49
49
|
DUCKDB_API ~Connection();
|
|
50
50
|
|
|
51
51
|
shared_ptr<ClientContext> context;
|
|
52
|
-
|
|
52
|
+
warning_callback_t warning_cb;
|
|
53
53
|
|
|
54
54
|
public:
|
|
55
55
|
//! Returns query profiling information for the current query
|
|
@@ -63,8 +63,6 @@ public:
|
|
|
63
63
|
//! Disable query profiling
|
|
64
64
|
DUCKDB_API void DisableProfiling();
|
|
65
65
|
|
|
66
|
-
DUCKDB_API void SetWarningCallback(warning_callback);
|
|
67
|
-
|
|
68
66
|
//! Enable aggressive verification/testing of queries, should only be used in testing
|
|
69
67
|
DUCKDB_API void EnableQueryVerification();
|
|
70
68
|
DUCKDB_API void DisableQueryVerification();
|
|
@@ -83,8 +81,8 @@ public:
|
|
|
83
81
|
//! MaterializedQueryResult.
|
|
84
82
|
DUCKDB_API unique_ptr<MaterializedQueryResult> Query(unique_ptr<SQLStatement> statement);
|
|
85
83
|
// prepared statements
|
|
86
|
-
template <typename...
|
|
87
|
-
unique_ptr<QueryResult> Query(const string &query,
|
|
84
|
+
template <typename... ARGS>
|
|
85
|
+
unique_ptr<QueryResult> Query(const string &query, ARGS... args) {
|
|
88
86
|
vector<Value> values;
|
|
89
87
|
return QueryParamsRecursive(query, values, args...);
|
|
90
88
|
}
|
|
@@ -167,28 +165,29 @@ public:
|
|
|
167
165
|
//! Fetch a list of table names that are required for a given query
|
|
168
166
|
DUCKDB_API unordered_set<string> GetTableNames(const string &query);
|
|
169
167
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
UDFWrapper::
|
|
168
|
+
// NOLINTBEGIN
|
|
169
|
+
template <typename TR, typename... ARGS>
|
|
170
|
+
void CreateScalarFunction(const string &name, TR (*udf_func)(ARGS...)) {
|
|
171
|
+
scalar_function_t function = UDFWrapper::CreateScalarFunction<TR, ARGS...>(name, udf_func);
|
|
172
|
+
UDFWrapper::RegisterFunction<TR, ARGS...>(name, function, *context);
|
|
174
173
|
}
|
|
175
174
|
|
|
176
|
-
template <typename TR, typename...
|
|
175
|
+
template <typename TR, typename... ARGS>
|
|
177
176
|
void CreateScalarFunction(const string &name, vector<LogicalType> args, LogicalType ret_type,
|
|
178
|
-
TR (*udf_func)(
|
|
179
|
-
scalar_function_t function = UDFWrapper::CreateScalarFunction<TR,
|
|
177
|
+
TR (*udf_func)(ARGS...)) {
|
|
178
|
+
scalar_function_t function = UDFWrapper::CreateScalarFunction<TR, ARGS...>(name, args, ret_type, udf_func);
|
|
180
179
|
UDFWrapper::RegisterFunction(name, args, ret_type, function, *context);
|
|
181
180
|
}
|
|
182
181
|
|
|
183
|
-
template <typename TR, typename...
|
|
182
|
+
template <typename TR, typename... ARGS>
|
|
184
183
|
void CreateVectorizedFunction(const string &name, scalar_function_t udf_func,
|
|
185
184
|
LogicalType varargs = LogicalType::INVALID) {
|
|
186
|
-
UDFWrapper::RegisterFunction<TR,
|
|
185
|
+
UDFWrapper::RegisterFunction<TR, ARGS...>(name, udf_func, *context, std::move(varargs));
|
|
187
186
|
}
|
|
188
187
|
|
|
189
188
|
void CreateVectorizedFunction(const string &name, vector<LogicalType> args, LogicalType ret_type,
|
|
190
189
|
scalar_function_t udf_func, LogicalType varargs = LogicalType::INVALID) {
|
|
191
|
-
UDFWrapper::RegisterFunction(name, std::move(args), std::move(ret_type), udf_func, *context,
|
|
190
|
+
UDFWrapper::RegisterFunction(name, std::move(args), std::move(ret_type), std::move(udf_func), *context,
|
|
192
191
|
std::move(varargs));
|
|
193
192
|
}
|
|
194
193
|
|
|
@@ -206,23 +205,24 @@ public:
|
|
|
206
205
|
}
|
|
207
206
|
|
|
208
207
|
template <typename UDF_OP, typename STATE, typename TR, typename TA>
|
|
209
|
-
void CreateAggregateFunction(const string &name, LogicalType ret_type, LogicalType
|
|
208
|
+
void CreateAggregateFunction(const string &name, LogicalType ret_type, LogicalType input_type_a) {
|
|
210
209
|
AggregateFunction function =
|
|
211
|
-
UDFWrapper::CreateAggregateFunction<UDF_OP, STATE, TR, TA>(name, ret_type,
|
|
210
|
+
UDFWrapper::CreateAggregateFunction<UDF_OP, STATE, TR, TA>(name, ret_type, input_type_a);
|
|
212
211
|
UDFWrapper::RegisterAggrFunction(function, *context);
|
|
213
212
|
}
|
|
214
213
|
|
|
215
214
|
template <typename UDF_OP, typename STATE, typename TR, typename TA, typename TB>
|
|
216
|
-
void CreateAggregateFunction(const string &name, LogicalType ret_type, LogicalType
|
|
217
|
-
LogicalType
|
|
215
|
+
void CreateAggregateFunction(const string &name, LogicalType ret_type, LogicalType input_type_a,
|
|
216
|
+
LogicalType input_type_b) {
|
|
218
217
|
AggregateFunction function =
|
|
219
|
-
UDFWrapper::CreateAggregateFunction<UDF_OP, STATE, TR, TA, TB>(name, ret_type,
|
|
218
|
+
UDFWrapper::CreateAggregateFunction<UDF_OP, STATE, TR, TA, TB>(name, ret_type, input_type_a, input_type_b);
|
|
220
219
|
UDFWrapper::RegisterAggrFunction(function, *context);
|
|
221
220
|
}
|
|
222
221
|
|
|
223
|
-
void CreateAggregateFunction(const string &name, vector<LogicalType> arguments,
|
|
224
|
-
|
|
225
|
-
|
|
222
|
+
void CreateAggregateFunction(const string &name, const vector<LogicalType> &arguments,
|
|
223
|
+
const LogicalType &return_type, aggregate_size_t state_size,
|
|
224
|
+
aggregate_initialize_t initialize, aggregate_update_t update,
|
|
225
|
+
aggregate_combine_t combine, aggregate_finalize_t finalize,
|
|
226
226
|
aggregate_simple_update_t simple_update = nullptr,
|
|
227
227
|
bind_aggregate_function_t bind = nullptr,
|
|
228
228
|
aggregate_destructor_t destructor = nullptr) {
|
|
@@ -231,12 +231,13 @@ public:
|
|
|
231
231
|
finalize, simple_update, bind, destructor);
|
|
232
232
|
UDFWrapper::RegisterAggrFunction(function, *context);
|
|
233
233
|
}
|
|
234
|
+
// NOLINTEND
|
|
234
235
|
|
|
235
236
|
private:
|
|
236
237
|
unique_ptr<QueryResult> QueryParamsRecursive(const string &query, vector<Value> &values);
|
|
237
238
|
|
|
238
|
-
template <typename T, typename...
|
|
239
|
-
unique_ptr<QueryResult> QueryParamsRecursive(const string &query, vector<Value> &values, T value,
|
|
239
|
+
template <typename T, typename... ARGS>
|
|
240
|
+
unique_ptr<QueryResult> QueryParamsRecursive(const string &query, vector<Value> &values, T value, ARGS... args) {
|
|
240
241
|
values.push_back(Value::CreateValue<T>(value));
|
|
241
242
|
return QueryParamsRecursive(query, values, args...);
|
|
242
243
|
}
|