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
@@ -41,22 +41,6 @@ ReadCSVData::ReadCSVData() {
|
|
41
41
|
|
42
42
|
void ReadCSVData::FinalizeRead(ClientContext &context) {
|
43
43
|
BaseCSVData::Finalize();
|
44
|
-
if (!options.rejects_recovery_columns.empty()) {
|
45
|
-
for (auto &recovery_col : options.rejects_recovery_columns) {
|
46
|
-
bool found = false;
|
47
|
-
for (idx_t col_idx = 0; col_idx < return_names.size(); col_idx++) {
|
48
|
-
if (StringUtil::CIEquals(return_names[col_idx], recovery_col)) {
|
49
|
-
options.rejects_recovery_column_ids.push_back(col_idx);
|
50
|
-
found = true;
|
51
|
-
break;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
if (!found) {
|
55
|
-
throw BinderException("Unsupported parameter for REJECTS_RECOVERY_COLUMNS: column \"%s\" not found",
|
56
|
-
recovery_col);
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
60
44
|
}
|
61
45
|
|
62
46
|
static unique_ptr<FunctionData> ReadCSVBind(ClientContext &context, TableFunctionBindInput &input,
|
@@ -67,26 +51,32 @@ static unique_ptr<FunctionData> ReadCSVBind(ClientContext &context, TableFunctio
|
|
67
51
|
result->files = MultiFileReader::GetFileList(context, input.inputs[0], "CSV");
|
68
52
|
|
69
53
|
options.FromNamedParameters(input.named_parameters, context, return_types, names);
|
70
|
-
|
54
|
+
if (options.rejects_table_name.IsSetByUser() && !options.store_rejects.GetValue() &&
|
55
|
+
options.store_rejects.IsSetByUser()) {
|
56
|
+
throw BinderException("REJECTS_TABLE option is only supported when store_rejects is not manually set to false");
|
57
|
+
}
|
58
|
+
if (options.rejects_scan_name.IsSetByUser() && !options.store_rejects.GetValue() &&
|
59
|
+
options.store_rejects.IsSetByUser()) {
|
60
|
+
throw BinderException("REJECTS_SCAN option is only supported when store_rejects is not manually set to false");
|
61
|
+
}
|
62
|
+
if (options.rejects_scan_name.IsSetByUser() || options.rejects_table_name.IsSetByUser()) {
|
63
|
+
// Ensure we set store_rejects to true automagically
|
64
|
+
options.store_rejects.Set(true, false);
|
65
|
+
}
|
71
66
|
// Validate rejects_table options
|
72
|
-
if (
|
73
|
-
if (!options.ignore_errors) {
|
74
|
-
throw BinderException(
|
67
|
+
if (options.store_rejects.GetValue()) {
|
68
|
+
if (!options.ignore_errors.GetValue() && options.ignore_errors.IsSetByUser()) {
|
69
|
+
throw BinderException(
|
70
|
+
"STORE_REJECTS option is only supported when IGNORE_ERRORS is not manually set to false");
|
75
71
|
}
|
72
|
+
// Ensure we set ignore errors to true automagically
|
73
|
+
options.ignore_errors.Set(true, false);
|
76
74
|
if (options.file_options.union_by_name) {
|
77
75
|
throw BinderException("REJECTS_TABLE option is not supported when UNION_BY_NAME is set to true");
|
78
76
|
}
|
79
77
|
}
|
80
|
-
|
81
|
-
|
82
|
-
if (options.rejects_table_name.empty()) {
|
83
|
-
throw BinderException("REJECTS_LIMIT option is only supported when REJECTS_TABLE is set to a table name");
|
84
|
-
}
|
85
|
-
}
|
86
|
-
|
87
|
-
if (!options.rejects_recovery_columns.empty() && options.rejects_table_name.empty()) {
|
88
|
-
throw BinderException(
|
89
|
-
"REJECTS_RECOVERY_COLUMNS option is only supported when REJECTS_TABLE is set to a table name");
|
78
|
+
if (options.rejects_limit != 0 && !options.store_rejects.GetValue()) {
|
79
|
+
throw BinderException("REJECTS_LIMIT option is only supported when REJECTS_TABLE is set to a table name");
|
90
80
|
}
|
91
81
|
|
92
82
|
options.file_options.AutoDetectHivePartitioning(result->files, context);
|
@@ -142,8 +132,28 @@ static unique_ptr<FunctionData> ReadCSVBind(ClientContext &context, TableFunctio
|
|
142
132
|
}
|
143
133
|
result->return_types = return_types;
|
144
134
|
result->return_names = names;
|
145
|
-
|
146
|
-
|
135
|
+
if (!options.force_not_null_names.empty()) {
|
136
|
+
// Lets first check all column names match
|
137
|
+
duckdb::unordered_set<string> column_names;
|
138
|
+
for (auto &name : names) {
|
139
|
+
column_names.insert(name);
|
140
|
+
}
|
141
|
+
for (auto &force_name : options.force_not_null_names) {
|
142
|
+
if (column_names.find(force_name) == column_names.end()) {
|
143
|
+
throw BinderException("\"force_not_null\" expected to find %s, but it was not found in the table",
|
144
|
+
force_name);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
D_ASSERT(options.force_not_null.empty());
|
148
|
+
for (idx_t i = 0; i < names.size(); i++) {
|
149
|
+
if (options.force_not_null_names.find(names[i]) != options.force_not_null_names.end()) {
|
150
|
+
options.force_not_null.push_back(true);
|
151
|
+
} else {
|
152
|
+
options.force_not_null.push_back(false);
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
result->Finalize();
|
147
157
|
return std::move(result);
|
148
158
|
}
|
149
159
|
|
@@ -167,9 +177,10 @@ static unique_ptr<GlobalTableFunctionState> ReadCSVInitGlobal(ClientContext &con
|
|
167
177
|
auto &bind_data = input.bind_data->Cast<ReadCSVData>();
|
168
178
|
|
169
179
|
// Create the temporary rejects table
|
170
|
-
|
171
|
-
|
172
|
-
|
180
|
+
if (bind_data.options.store_rejects.GetValue()) {
|
181
|
+
CSVRejectsTable::GetOrCreate(context, bind_data.options.rejects_scan_name.GetValue(),
|
182
|
+
bind_data.options.rejects_table_name.GetValue())
|
183
|
+
->InitializeTable(context, bind_data);
|
173
184
|
}
|
174
185
|
if (bind_data.files.empty()) {
|
175
186
|
// This can happen when a filename based filter pushdown has eliminated all possible files for this scan.
|
@@ -185,7 +196,7 @@ unique_ptr<LocalTableFunctionState> ReadCSVInitLocal(ExecutionContext &context,
|
|
185
196
|
return nullptr;
|
186
197
|
}
|
187
198
|
auto &global_state = global_state_p->Cast<CSVGlobalState>();
|
188
|
-
auto csv_scanner = global_state.Next();
|
199
|
+
auto csv_scanner = global_state.Next(nullptr);
|
189
200
|
if (!csv_scanner) {
|
190
201
|
global_state.DecrementThread();
|
191
202
|
}
|
@@ -211,7 +222,7 @@ static void ReadCSVFunction(ClientContext &context, TableFunctionInput &data_p,
|
|
211
222
|
break;
|
212
223
|
}
|
213
224
|
if (csv_local_state.csv_reader->FinishedIterator()) {
|
214
|
-
csv_local_state.csv_reader = csv_global_state.Next();
|
225
|
+
csv_local_state.csv_reader = csv_global_state.Next(csv_local_state.csv_reader.get());
|
215
226
|
if (!csv_local_state.csv_reader) {
|
216
227
|
csv_global_state.DecrementThread();
|
217
228
|
break;
|
@@ -234,7 +245,7 @@ void ReadCSVTableFunction::ReadCSVAddNamedParameters(TableFunction &table_functi
|
|
234
245
|
table_function.named_parameters["quote"] = LogicalType::VARCHAR;
|
235
246
|
table_function.named_parameters["new_line"] = LogicalType::VARCHAR;
|
236
247
|
table_function.named_parameters["escape"] = LogicalType::VARCHAR;
|
237
|
-
table_function.named_parameters["nullstr"] = LogicalType::
|
248
|
+
table_function.named_parameters["nullstr"] = LogicalType::ANY;
|
238
249
|
table_function.named_parameters["columns"] = LogicalType::ANY;
|
239
250
|
table_function.named_parameters["auto_type_candidates"] = LogicalType::ANY;
|
240
251
|
table_function.named_parameters["header"] = LogicalType::BOOLEAN;
|
@@ -249,9 +260,11 @@ void ReadCSVTableFunction::ReadCSVAddNamedParameters(TableFunction &table_functi
|
|
249
260
|
table_function.named_parameters["max_line_size"] = LogicalType::VARCHAR;
|
250
261
|
table_function.named_parameters["maximum_line_size"] = LogicalType::VARCHAR;
|
251
262
|
table_function.named_parameters["ignore_errors"] = LogicalType::BOOLEAN;
|
263
|
+
table_function.named_parameters["store_rejects"] = LogicalType::BOOLEAN;
|
252
264
|
table_function.named_parameters["rejects_table"] = LogicalType::VARCHAR;
|
265
|
+
table_function.named_parameters["rejects_scan"] = LogicalType::VARCHAR;
|
253
266
|
table_function.named_parameters["rejects_limit"] = LogicalType::BIGINT;
|
254
|
-
table_function.named_parameters["
|
267
|
+
table_function.named_parameters["force_not_null"] = LogicalType::LIST(LogicalType::VARCHAR);
|
255
268
|
table_function.named_parameters["buffer_size"] = LogicalType::UBIGINT;
|
256
269
|
table_function.named_parameters["decimal_separator"] = LogicalType::VARCHAR;
|
257
270
|
table_function.named_parameters["parallel"] = LogicalType::BOOLEAN;
|
@@ -83,17 +83,6 @@ static unique_ptr<FunctionData> CSVSniffBind(ClientContext &context, TableFuncti
|
|
83
83
|
return std::move(result);
|
84
84
|
}
|
85
85
|
|
86
|
-
string NewLineIdentifierToString(NewLineIdentifier identifier) {
|
87
|
-
switch (identifier) {
|
88
|
-
case NewLineIdentifier::SINGLE:
|
89
|
-
return "\\n";
|
90
|
-
case NewLineIdentifier::CARRY_ON:
|
91
|
-
return "\\r\\n";
|
92
|
-
default:
|
93
|
-
return "";
|
94
|
-
}
|
95
|
-
}
|
96
|
-
|
97
86
|
string FormatOptions(char opt) {
|
98
87
|
if (opt == '\'') {
|
99
88
|
return "''";
|
@@ -121,6 +110,12 @@ static void CSVSniffFunction(ClientContext &context, TableFunctionInput &data_p,
|
|
121
110
|
sniffer_options.file_path = data.path;
|
122
111
|
|
123
112
|
auto buffer_manager = make_shared<CSVBufferManager>(context, sniffer_options, sniffer_options.file_path, 0);
|
113
|
+
if (sniffer_options.name_list.empty()) {
|
114
|
+
sniffer_options.name_list = data.names_csv;
|
115
|
+
}
|
116
|
+
if (sniffer_options.sql_type_list.empty()) {
|
117
|
+
sniffer_options.sql_type_list = data.return_types_csv;
|
118
|
+
}
|
124
119
|
CSVSniffer sniffer(sniffer_options, buffer_manager, CSVStateMachineCache::Get(context));
|
125
120
|
auto sniffer_result = sniffer.SniffCSV(true);
|
126
121
|
string str_opt;
|
@@ -138,8 +133,7 @@ static void CSVSniffFunction(ClientContext &context, TableFunctionInput &data_p,
|
|
138
133
|
str_opt = sniffer_options.dialect_options.state_machine_options.escape.GetValue();
|
139
134
|
output.SetValue(2, 0, str_opt);
|
140
135
|
// 4. NewLine Delimiter
|
141
|
-
auto new_line_identifier =
|
142
|
-
NewLineIdentifierToString(sniffer_options.dialect_options.state_machine_options.new_line.GetValue());
|
136
|
+
auto new_line_identifier = sniffer_options.NewLineIdentifierToString();
|
143
137
|
output.SetValue(3, 0, new_line_identifier);
|
144
138
|
// 5. Skip Rows
|
145
139
|
output.SetValue(4, 0, Value::UINTEGER(NumericCast<uint32_t>(sniffer_options.dialect_options.skip_rows.GetValue())));
|
@@ -153,7 +153,7 @@ void DuckDBConstraintsFunction(ClientContext &context, TableFunctionInput &data_
|
|
153
153
|
break;
|
154
154
|
case ConstraintType::UNIQUE: {
|
155
155
|
auto &unique = constraint->Cast<UniqueConstraint>();
|
156
|
-
constraint_type = unique.
|
156
|
+
constraint_type = unique.IsPrimaryKey() ? "PRIMARY KEY" : "UNIQUE";
|
157
157
|
break;
|
158
158
|
}
|
159
159
|
case ConstraintType::NOT_NULL:
|
@@ -32,6 +32,9 @@ static unique_ptr<FunctionData> DuckDBDatabasesBind(ClientContext &context, Tabl
|
|
32
32
|
names.emplace_back("type");
|
33
33
|
return_types.emplace_back(LogicalType::VARCHAR);
|
34
34
|
|
35
|
+
names.emplace_back("readonly");
|
36
|
+
return_types.emplace_back(LogicalType::BOOLEAN);
|
37
|
+
|
35
38
|
return nullptr;
|
36
39
|
}
|
37
40
|
|
@@ -64,8 +67,9 @@ void DuckDBDatabasesFunction(ClientContext &context, TableFunctionInput &data_p,
|
|
64
67
|
output.SetValue(col++, count, attached.GetName());
|
65
68
|
// database_oid, BIGINT
|
66
69
|
output.SetValue(col++, count, Value::BIGINT(attached.oid));
|
67
|
-
// path, VARCHAR
|
68
70
|
bool is_internal = attached.IsSystem() || attached.IsTemporary();
|
71
|
+
bool is_readonly = attached.IsReadOnly();
|
72
|
+
// path, VARCHAR
|
69
73
|
Value db_path;
|
70
74
|
if (!is_internal) {
|
71
75
|
bool in_memory = attached.GetCatalog().InMemory();
|
@@ -80,6 +84,8 @@ void DuckDBDatabasesFunction(ClientContext &context, TableFunctionInput &data_p,
|
|
80
84
|
output.SetValue(col++, count, Value::BOOLEAN(is_internal));
|
81
85
|
// type, VARCHAR
|
82
86
|
output.SetValue(col++, count, Value(attached.GetCatalog().GetCatalogType()));
|
87
|
+
// readonly, BOOLEAN
|
88
|
+
output.SetValue(col++, count, Value::BOOLEAN(is_readonly));
|
83
89
|
|
84
90
|
count++;
|
85
91
|
}
|
@@ -17,6 +17,7 @@ struct ExtensionInformation {
|
|
17
17
|
string file_path;
|
18
18
|
string description;
|
19
19
|
vector<Value> aliases;
|
20
|
+
string extension_version;
|
20
21
|
};
|
21
22
|
|
22
23
|
struct DuckDBExtensionsData : public GlobalTableFunctionState {
|
@@ -47,6 +48,9 @@ static unique_ptr<FunctionData> DuckDBExtensionsBind(ClientContext &context, Tab
|
|
47
48
|
names.emplace_back("aliases");
|
48
49
|
return_types.emplace_back(LogicalType::LIST(LogicalType::VARCHAR));
|
49
50
|
|
51
|
+
names.emplace_back("extension_version");
|
52
|
+
return_types.emplace_back(LogicalType::VARCHAR);
|
53
|
+
|
50
54
|
return nullptr;
|
51
55
|
}
|
52
56
|
|
@@ -98,16 +102,20 @@ unique_ptr<GlobalTableFunctionState> DuckDBExtensionsInit(ClientContext &context
|
|
98
102
|
});
|
99
103
|
#endif
|
100
104
|
// now check the list of currently loaded extensions
|
101
|
-
auto &loaded_extensions = db.
|
102
|
-
for (auto &
|
105
|
+
auto &loaded_extensions = db.LoadedExtensionsData();
|
106
|
+
for (auto &e : loaded_extensions) {
|
107
|
+
auto &ext_name = e.first;
|
108
|
+
auto &ext_info = e.second;
|
103
109
|
auto entry = installed_extensions.find(ext_name);
|
104
110
|
if (entry == installed_extensions.end()) {
|
105
111
|
ExtensionInformation info;
|
106
112
|
info.name = ext_name;
|
107
113
|
info.loaded = true;
|
114
|
+
info.extension_version = ext_info.extension_version;
|
108
115
|
installed_extensions[ext_name] = std::move(info);
|
109
116
|
} else {
|
110
117
|
entry->second.loaded = true;
|
118
|
+
entry->second.extension_version = ext_info.extension_version;
|
111
119
|
}
|
112
120
|
}
|
113
121
|
|
@@ -143,6 +151,8 @@ void DuckDBExtensionsFunction(ClientContext &context, TableFunctionInput &data_p
|
|
143
151
|
output.SetValue(4, count, Value(entry.description));
|
144
152
|
// aliases LogicalType::LIST(LogicalType::VARCHAR)
|
145
153
|
output.SetValue(5, count, Value::LIST(LogicalType::VARCHAR, entry.aliases));
|
154
|
+
// extension version LogicalType::LIST(LogicalType::VARCHAR)
|
155
|
+
output.SetValue(6, count, Value(entry.extension_version));
|
146
156
|
|
147
157
|
data.offset++;
|
148
158
|
count++;
|
@@ -122,8 +122,7 @@ void DuckDBSequencesFunction(ClientContext &context, TableFunctionInput &data_p,
|
|
122
122
|
// cycle, BOOLEAN
|
123
123
|
output.SetValue(col++, count, Value::BOOLEAN(seq_data.cycle));
|
124
124
|
// last_value, BIGINT
|
125
|
-
output.SetValue(col++, count,
|
126
|
-
seq_data.usage_count == 0 ? Value() : Value::BOOLEAN(NumericCast<int8_t>(seq_data.last_value)));
|
125
|
+
output.SetValue(col++, count, seq_data.usage_count == 0 ? Value() : Value::BIGINT(seq_data.last_value));
|
127
126
|
// sql, LogicalType::VARCHAR
|
128
127
|
output.SetValue(col++, count, Value(seq.ToSQL()));
|
129
128
|
|
@@ -87,7 +87,7 @@ static bool TableHasPrimaryKey(TableCatalogEntry &table) {
|
|
87
87
|
for (auto &constraint : table.GetConstraints()) {
|
88
88
|
if (constraint->type == ConstraintType::UNIQUE) {
|
89
89
|
auto &unique = constraint->Cast<UniqueConstraint>();
|
90
|
-
if (unique.
|
90
|
+
if (unique.IsPrimaryKey()) {
|
91
91
|
return true;
|
92
92
|
}
|
93
93
|
}
|
@@ -146,7 +146,7 @@ void DuckDBTablesFunction(ClientContext &context, TableFunctionInput &data_p, Da
|
|
146
146
|
output.SetValue(col++, count, Value::BOOLEAN(TableHasPrimaryKey(table)));
|
147
147
|
// estimated_size, LogicalType::BIGINT
|
148
148
|
Value card_val =
|
149
|
-
storage_info.cardinality
|
149
|
+
!storage_info.cardinality.IsValid() ? Value() : Value::BIGINT(storage_info.cardinality.GetIndex());
|
150
150
|
output.SetValue(col++, count, card_val);
|
151
151
|
// column_count, LogicalType::BIGINT
|
152
152
|
output.SetValue(col++, count, Value::BIGINT(table.GetColumns().LogicalColumnCount()));
|
@@ -34,8 +34,15 @@ static unique_ptr<FunctionData> PragmaMetadataInfoBind(ClientContext &context, T
|
|
34
34
|
names.emplace_back("free_list");
|
35
35
|
return_types.emplace_back(LogicalType::LIST(LogicalType::BIGINT));
|
36
36
|
|
37
|
-
string db_name
|
38
|
-
|
37
|
+
string db_name;
|
38
|
+
if (input.inputs.empty()) {
|
39
|
+
db_name = DatabaseManager::GetDefaultDatabase(context);
|
40
|
+
} else {
|
41
|
+
if (input.inputs[0].IsNull()) {
|
42
|
+
throw BinderException("Database argument for pragma_metadata_info cannot be NULL");
|
43
|
+
}
|
44
|
+
db_name = StringValue::Get(input.inputs[0]);
|
45
|
+
}
|
39
46
|
auto &catalog = Catalog::GetCatalog(context, db_name);
|
40
47
|
auto result = make_uniq<PragmaMetadataFunctionData>();
|
41
48
|
result->metadata_info = catalog.GetMetadataInfo(context);
|
@@ -195,12 +195,16 @@ static ColumnConstraintInfo CheckConstraints(TableCatalogEntry &table, const Col
|
|
195
195
|
}
|
196
196
|
case ConstraintType::UNIQUE: {
|
197
197
|
auto &unique = constraint->Cast<UniqueConstraint>();
|
198
|
-
bool &constraint_info = unique.
|
199
|
-
if (unique.
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
198
|
+
bool &constraint_info = unique.IsPrimaryKey() ? result.pk : result.unique;
|
199
|
+
if (unique.HasIndex()) {
|
200
|
+
if (unique.GetIndex() == column.Logical()) {
|
201
|
+
constraint_info = true;
|
202
|
+
}
|
203
|
+
} else {
|
204
|
+
auto &columns = unique.GetColumnNames();
|
205
|
+
if (std::find(columns.begin(), columns.end(), column.GetName()) != columns.end()) {
|
206
|
+
constraint_info = true;
|
207
|
+
}
|
204
208
|
}
|
205
209
|
break;
|
206
210
|
}
|
@@ -193,7 +193,7 @@ BindInfo TableScanGetBindInfo(const optional_ptr<FunctionData> bind_data_p) {
|
|
193
193
|
return BindInfo(bind_data.table);
|
194
194
|
}
|
195
195
|
|
196
|
-
void TableScanDependency(
|
196
|
+
void TableScanDependency(LogicalDependencyList &entries, const FunctionData *bind_data_p) {
|
197
197
|
auto &bind_data = bind_data_p->Cast<TableScanBindData>();
|
198
198
|
entries.AddDependency(bind_data.table);
|
199
199
|
}
|
@@ -306,9 +306,6 @@ void TableScanPushdownComplexFilter(ClientContext &context, LogicalGet &get, Fun
|
|
306
306
|
return;
|
307
307
|
}
|
308
308
|
|
309
|
-
// Lazily initialize any unknown indexes that might have been loaded by an extension
|
310
|
-
storage.info->InitializeIndexes(context);
|
311
|
-
|
312
309
|
// behold
|
313
310
|
storage.info->indexes.Scan([&](Index &index) {
|
314
311
|
// first rewrite the index expression so the ColumnBindings align with the column bindings of the current table
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#ifndef DUCKDB_PATCH_VERSION
|
2
|
-
#define DUCKDB_PATCH_VERSION "
|
2
|
+
#define DUCKDB_PATCH_VERSION "2"
|
3
3
|
#endif
|
4
4
|
#ifndef DUCKDB_MINOR_VERSION
|
5
5
|
#define DUCKDB_MINOR_VERSION 10
|
@@ -8,10 +8,10 @@
|
|
8
8
|
#define DUCKDB_MAJOR_VERSION 0
|
9
9
|
#endif
|
10
10
|
#ifndef DUCKDB_VERSION
|
11
|
-
#define DUCKDB_VERSION "v0.10.
|
11
|
+
#define DUCKDB_VERSION "v0.10.2"
|
12
12
|
#endif
|
13
13
|
#ifndef DUCKDB_SOURCE_ID
|
14
|
-
#define DUCKDB_SOURCE_ID "
|
14
|
+
#define DUCKDB_SOURCE_ID "1601d94f94"
|
15
15
|
#endif
|
16
16
|
#include "duckdb/function/table/system_functions.hpp"
|
17
17
|
#include "duckdb/main/database.hpp"
|
@@ -16,6 +16,7 @@
|
|
16
16
|
#include "duckdb/common/atomic.hpp"
|
17
17
|
#include "duckdb/common/optional_ptr.hpp"
|
18
18
|
#include "duckdb/common/enums/on_entry_not_found.hpp"
|
19
|
+
#include "duckdb/common/error_data.hpp"
|
19
20
|
#include "duckdb/common/exception/catalog_exception.hpp"
|
20
21
|
#include "duckdb/common/enums/catalog_lookup_behavior.hpp"
|
21
22
|
#include <functional>
|
@@ -90,6 +91,7 @@ public:
|
|
90
91
|
DUCKDB_API static Catalog &GetCatalog(AttachedDatabase &db);
|
91
92
|
|
92
93
|
DUCKDB_API AttachedDatabase &GetAttached();
|
94
|
+
DUCKDB_API const AttachedDatabase &GetAttached() const;
|
93
95
|
DUCKDB_API DatabaseInstance &GetDatabase();
|
94
96
|
|
95
97
|
virtual bool IsDuckCatalog() {
|
@@ -106,7 +108,7 @@ public:
|
|
106
108
|
DUCKDB_API idx_t ModifyCatalog();
|
107
109
|
|
108
110
|
//! Returns the catalog name - based on how the catalog was attached
|
109
|
-
DUCKDB_API const string &GetName();
|
111
|
+
DUCKDB_API const string &GetName() const;
|
110
112
|
DUCKDB_API idx_t GetOid();
|
111
113
|
DUCKDB_API virtual string GetCatalogType() = 0;
|
112
114
|
|
@@ -210,6 +212,7 @@ public:
|
|
210
212
|
QueryErrorContext error_context = QueryErrorContext());
|
211
213
|
//! Scans all the schemas in the system one-by-one, invoking the callback for each entry
|
212
214
|
DUCKDB_API virtual void ScanSchemas(ClientContext &context, std::function<void(SchemaCatalogEntry &)> callback) = 0;
|
215
|
+
|
213
216
|
//! Gets the "schema.name" entry of the specified type, if entry does not exist behavior depends on OnEntryNotFound
|
214
217
|
DUCKDB_API optional_ptr<CatalogEntry> GetEntry(ClientContext &context, CatalogType type, const string &schema,
|
215
218
|
const string &name, OnEntryNotFound if_not_found,
|
@@ -324,6 +327,7 @@ protected:
|
|
324
327
|
//! Reference to the database
|
325
328
|
AttachedDatabase &db;
|
326
329
|
|
330
|
+
public:
|
327
331
|
private:
|
328
332
|
//! Lookup an entry in the schema, returning a lookup with the entry and schema if they exist
|
329
333
|
CatalogEntryLookup TryLookupEntryInternal(CatalogTransaction transaction, CatalogType type, const string &schema,
|
@@ -364,7 +368,7 @@ public:
|
|
364
368
|
|
365
369
|
template <class TARGET>
|
366
370
|
const TARGET &Cast() const {
|
367
|
-
|
371
|
+
DynamicCastCheck<TARGET>(this);
|
368
372
|
return reinterpret_cast<const TARGET &>(*this);
|
369
373
|
}
|
370
374
|
};
|
@@ -29,7 +29,7 @@ public:
|
|
29
29
|
//! Create a DuckIndexEntry
|
30
30
|
DuckIndexEntry(Catalog &catalog, SchemaCatalogEntry &schema, CreateIndexInfo &info);
|
31
31
|
|
32
|
-
|
32
|
+
unique_ptr<CatalogEntry> Copy(ClientContext &context) const override;
|
33
33
|
|
34
34
|
//! The indexed table information
|
35
35
|
shared_ptr<IndexDataTableInfo> info;
|
@@ -41,7 +41,7 @@ public:
|
|
41
41
|
optional_ptr<CatalogEntry> AddEntry(CatalogTransaction transaction, unique_ptr<StandardEntry> entry,
|
42
42
|
OnCreateConflict on_conflict);
|
43
43
|
optional_ptr<CatalogEntry> AddEntryInternal(CatalogTransaction transaction, unique_ptr<StandardEntry> entry,
|
44
|
-
OnCreateConflict on_conflict,
|
44
|
+
OnCreateConflict on_conflict, LogicalDependencyList dependencies);
|
45
45
|
|
46
46
|
optional_ptr<CatalogEntry> CreateTable(CatalogTransaction transaction, BoundCreateTableInfo &info) override;
|
47
47
|
optional_ptr<CatalogEntry> CreateFunction(CatalogTransaction transaction, CreateFunctionInfo &info) override;
|
@@ -58,7 +58,7 @@ public:
|
|
58
58
|
SequenceCatalogEntry(Catalog &catalog, SchemaCatalogEntry &schema, CreateSequenceInfo &info);
|
59
59
|
|
60
60
|
public:
|
61
|
-
|
61
|
+
unique_ptr<CatalogEntry> Copy(ClientContext &context) const override;
|
62
62
|
unique_ptr<CreateInfo> GetInfo() const override;
|
63
63
|
|
64
64
|
SequenceData GetData() const;
|
@@ -77,7 +77,9 @@ public:
|
|
77
77
|
virtual string ToSQL() const;
|
78
78
|
|
79
79
|
virtual Catalog &ParentCatalog();
|
80
|
+
virtual const Catalog &ParentCatalog() const;
|
80
81
|
virtual SchemaCatalogEntry &ParentSchema();
|
82
|
+
virtual const SchemaCatalogEntry &ParentSchema() const;
|
81
83
|
|
82
84
|
virtual void Verify(Catalog &catalog);
|
83
85
|
|
@@ -100,7 +102,7 @@ public:
|
|
100
102
|
}
|
101
103
|
template <class TARGET>
|
102
104
|
const TARGET &Cast() const {
|
103
|
-
|
105
|
+
DynamicCastCheck<TARGET>(this);
|
104
106
|
return reinterpret_cast<const TARGET &>(*this);
|
105
107
|
}
|
106
108
|
};
|
@@ -117,6 +119,9 @@ public:
|
|
117
119
|
Catalog &ParentCatalog() override {
|
118
120
|
return catalog;
|
119
121
|
}
|
122
|
+
const Catalog &ParentCatalog() const override {
|
123
|
+
return catalog;
|
124
|
+
}
|
120
125
|
|
121
126
|
void Verify(Catalog &catalog) override;
|
122
127
|
};
|
@@ -26,7 +26,7 @@ namespace duckdb {
|
|
26
26
|
struct AlterInfo;
|
27
27
|
|
28
28
|
class ClientContext;
|
29
|
-
class
|
29
|
+
class LogicalDependencyList;
|
30
30
|
|
31
31
|
class DuckCatalog;
|
32
32
|
class TableCatalogEntry;
|
@@ -65,9 +65,9 @@ public:
|
|
65
65
|
//! Create an entry in the catalog set. Returns whether or not it was
|
66
66
|
//! successful.
|
67
67
|
DUCKDB_API bool CreateEntry(CatalogTransaction transaction, const string &name, unique_ptr<CatalogEntry> value,
|
68
|
-
const
|
68
|
+
const LogicalDependencyList &dependencies);
|
69
69
|
DUCKDB_API bool CreateEntry(ClientContext &context, const string &name, unique_ptr<CatalogEntry> value,
|
70
|
-
const
|
70
|
+
const LogicalDependencyList &dependencies);
|
71
71
|
|
72
72
|
DUCKDB_API bool AlterEntry(CatalogTransaction transaction, const string &name, AlterInfo &alter_info);
|
73
73
|
|
@@ -27,15 +27,15 @@ public:
|
|
27
27
|
|
28
28
|
SchemaCatalogEntry &schema;
|
29
29
|
|
30
|
-
DUCKDB_API static unique_ptr<CreateMacroInfo> CreateInternalMacroInfo(DefaultMacro &default_macro);
|
31
|
-
DUCKDB_API static unique_ptr<CreateMacroInfo> CreateInternalTableMacroInfo(DefaultMacro &default_macro);
|
30
|
+
DUCKDB_API static unique_ptr<CreateMacroInfo> CreateInternalMacroInfo(const DefaultMacro &default_macro);
|
31
|
+
DUCKDB_API static unique_ptr<CreateMacroInfo> CreateInternalTableMacroInfo(const DefaultMacro &default_macro);
|
32
32
|
|
33
33
|
public:
|
34
34
|
unique_ptr<CatalogEntry> CreateDefaultEntry(ClientContext &context, const string &entry_name) override;
|
35
35
|
vector<string> GetDefaultEntries() override;
|
36
36
|
|
37
37
|
private:
|
38
|
-
static unique_ptr<CreateMacroInfo> CreateInternalTableMacroInfo(DefaultMacro &default_macro,
|
38
|
+
static unique_ptr<CreateMacroInfo> CreateInternalTableMacroInfo(const DefaultMacro &default_macro,
|
39
39
|
unique_ptr<MacroFunction> function);
|
40
40
|
};
|
41
41
|
|
@@ -10,17 +10,18 @@
|
|
10
10
|
|
11
11
|
#include "duckdb/common/common.hpp"
|
12
12
|
#include "duckdb/common/unordered_set.hpp"
|
13
|
+
#include "duckdb/common/string_util.hpp"
|
13
14
|
|
14
15
|
namespace duckdb {
|
15
16
|
class CatalogEntry;
|
16
17
|
|
17
18
|
struct DependencyFlags {
|
18
|
-
private:
|
19
19
|
public:
|
20
20
|
DependencyFlags() : value(0) {
|
21
21
|
}
|
22
22
|
DependencyFlags(const DependencyFlags &other) : value(other.value) {
|
23
23
|
}
|
24
|
+
virtual ~DependencyFlags() = default;
|
24
25
|
DependencyFlags &operator=(const DependencyFlags &other) {
|
25
26
|
value = other.value;
|
26
27
|
return *this;
|
@@ -133,10 +134,31 @@ public:
|
|
133
134
|
}
|
134
135
|
};
|
135
136
|
|
137
|
+
struct CatalogEntryInfo {
|
138
|
+
public:
|
139
|
+
CatalogType type;
|
140
|
+
string schema;
|
141
|
+
string name;
|
142
|
+
|
143
|
+
public:
|
144
|
+
bool operator==(const CatalogEntryInfo &other) const {
|
145
|
+
if (other.type != type) {
|
146
|
+
return false;
|
147
|
+
}
|
148
|
+
if (!StringUtil::CIEquals(other.schema, schema)) {
|
149
|
+
return false;
|
150
|
+
}
|
151
|
+
if (!StringUtil::CIEquals(other.name, name)) {
|
152
|
+
return false;
|
153
|
+
}
|
154
|
+
return true;
|
155
|
+
}
|
156
|
+
};
|
157
|
+
|
136
158
|
struct Dependency {
|
137
|
-
Dependency(CatalogEntry &entry,
|
138
|
-
|
139
|
-
|
159
|
+
Dependency(CatalogEntry &entry, // NOLINT: Allow implicit conversion from `CatalogEntry`
|
160
|
+
DependencyDependentFlags flags = DependencyDependentFlags().SetBlocking())
|
161
|
+
: entry(entry), flags(std::move(flags)) {
|
140
162
|
}
|
141
163
|
|
142
164
|
//! The catalog entry this depends on
|