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
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
#include <utility>
|
|
15
15
|
|
|
16
16
|
#include "util/logging.h"
|
|
17
|
-
#include "util/pod_array.h"
|
|
18
17
|
#include "util/utf.h"
|
|
18
|
+
#include "re2/pod_array.h"
|
|
19
19
|
#include "re2/prog.h"
|
|
20
20
|
#include "re2/re2.h"
|
|
21
21
|
#include "re2/regexp.h"
|
|
@@ -30,92 +30,60 @@ namespace duckdb_re2 {
|
|
|
30
30
|
// See http://swtch.com/~rsc/regexp/regexp1.html for inspiration.
|
|
31
31
|
//
|
|
32
32
|
// Because the out and out1 fields in Inst are no longer pointers,
|
|
33
|
-
// we can't use pointers directly here either. Instead,
|
|
34
|
-
// to inst_[
|
|
35
|
-
//
|
|
33
|
+
// we can't use pointers directly here either. Instead, head refers
|
|
34
|
+
// to inst_[head>>1].out (head&1 == 0) or inst_[head>>1].out1 (head&1 == 1).
|
|
35
|
+
// head == 0 represents the NULL list. This is okay because instruction #0
|
|
36
36
|
// is always the fail instruction, which never appears on a list.
|
|
37
|
-
|
|
38
37
|
struct PatchList {
|
|
39
|
-
uint32_t p;
|
|
40
|
-
|
|
41
38
|
// Returns patch list containing just p.
|
|
42
|
-
static PatchList Mk(uint32_t p)
|
|
39
|
+
static PatchList Mk(uint32_t p) {
|
|
40
|
+
return {p, p};
|
|
41
|
+
}
|
|
43
42
|
|
|
44
|
-
// Patches all the entries on l to have value
|
|
43
|
+
// Patches all the entries on l to have value p.
|
|
45
44
|
// Caller must not ever use patch list again.
|
|
46
|
-
static void Patch(Prog::Inst
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// Returns patch list containing just p.
|
|
58
|
-
PatchList PatchList::Mk(uint32_t p) {
|
|
59
|
-
PatchList l;
|
|
60
|
-
l.p = p;
|
|
61
|
-
return l;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Returns the next pointer pointed at by l.
|
|
65
|
-
PatchList PatchList::Deref(Prog::Inst* inst0, PatchList l) {
|
|
66
|
-
Prog::Inst* ip = &inst0[l.p>>1];
|
|
67
|
-
if (l.p&1)
|
|
68
|
-
l.p = ip->out1();
|
|
69
|
-
else
|
|
70
|
-
l.p = ip->out();
|
|
71
|
-
return l;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Patches all the entries on l to have value v.
|
|
75
|
-
void PatchList::Patch(Prog::Inst *inst0, PatchList l, uint32_t val) {
|
|
76
|
-
while (l.p != 0) {
|
|
77
|
-
Prog::Inst* ip = &inst0[l.p>>1];
|
|
78
|
-
if (l.p&1) {
|
|
79
|
-
l.p = ip->out1();
|
|
80
|
-
ip->out1_ = val;
|
|
81
|
-
} else {
|
|
82
|
-
l.p = ip->out();
|
|
83
|
-
ip->set_out(val);
|
|
45
|
+
static void Patch(Prog::Inst* inst0, PatchList l, uint32_t p) {
|
|
46
|
+
while (l.head != 0) {
|
|
47
|
+
Prog::Inst* ip = &inst0[l.head>>1];
|
|
48
|
+
if (l.head&1) {
|
|
49
|
+
l.head = ip->out1();
|
|
50
|
+
ip->out1_ = p;
|
|
51
|
+
} else {
|
|
52
|
+
l.head = ip->out();
|
|
53
|
+
ip->set_out(p);
|
|
54
|
+
}
|
|
84
55
|
}
|
|
85
56
|
}
|
|
86
|
-
}
|
|
87
57
|
|
|
88
|
-
// Appends two patch lists and returns result.
|
|
89
|
-
PatchList
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
l = next;
|
|
58
|
+
// Appends two patch lists and returns result.
|
|
59
|
+
static PatchList Append(Prog::Inst* inst0, PatchList l1, PatchList l2) {
|
|
60
|
+
if (l1.head == 0)
|
|
61
|
+
return l2;
|
|
62
|
+
if (l2.head == 0)
|
|
63
|
+
return l1;
|
|
64
|
+
Prog::Inst* ip = &inst0[l1.tail>>1];
|
|
65
|
+
if (l1.tail&1)
|
|
66
|
+
ip->out1_ = l2.head;
|
|
67
|
+
else
|
|
68
|
+
ip->set_out(l2.head);
|
|
69
|
+
return {l1.head, l2.tail};
|
|
101
70
|
}
|
|
102
71
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
else
|
|
107
|
-
ip->set_out(l2.p);
|
|
72
|
+
uint32_t head;
|
|
73
|
+
uint32_t tail; // for constant-time append
|
|
74
|
+
};
|
|
108
75
|
|
|
109
|
-
|
|
110
|
-
}
|
|
76
|
+
static const PatchList kNullPatchList = {0, 0};
|
|
111
77
|
|
|
112
78
|
// Compiled program fragment.
|
|
113
79
|
struct Frag {
|
|
114
80
|
uint32_t begin;
|
|
115
81
|
PatchList end;
|
|
82
|
+
bool nullable;
|
|
116
83
|
|
|
117
|
-
Frag() : begin(0)
|
|
118
|
-
Frag(uint32_t begin, PatchList end
|
|
84
|
+
Frag() : begin(0), end(kNullPatchList), nullable(false) {}
|
|
85
|
+
Frag(uint32_t begin, PatchList end, bool nullable)
|
|
86
|
+
: begin(begin), end(end), nullable(nullable) {}
|
|
119
87
|
};
|
|
120
88
|
|
|
121
89
|
// Input encodings.
|
|
@@ -212,8 +180,8 @@ class Compiler : public Regexp::Walker<Frag> {
|
|
|
212
180
|
int AddSuffixRecursive(int root, int id);
|
|
213
181
|
|
|
214
182
|
// Finds the trie node for the given suffix. Returns a Frag in order to
|
|
215
|
-
// distinguish between pointing at the root node directly (end.
|
|
216
|
-
// and pointing at an Alt's out1 or out (end.
|
|
183
|
+
// distinguish between pointing at the root node directly (end.head == 0)
|
|
184
|
+
// and pointing at an Alt's out1 or out (end.head&1 == 1 or 0, respectively).
|
|
217
185
|
Frag FindByteRange(int root, int id);
|
|
218
186
|
|
|
219
187
|
// Compares two ByteRanges and returns true iff they are equal.
|
|
@@ -225,8 +193,8 @@ class Compiler : public Regexp::Walker<Frag> {
|
|
|
225
193
|
// Single rune.
|
|
226
194
|
Frag Literal(Rune r, bool foldcase);
|
|
227
195
|
|
|
228
|
-
void Setup(Regexp::ParseFlags, int64_t, RE2::Anchor);
|
|
229
|
-
Prog* Finish();
|
|
196
|
+
void Setup(Regexp::ParseFlags flags, int64_t max_mem, RE2::Anchor anchor);
|
|
197
|
+
Prog* Finish(Regexp* re);
|
|
230
198
|
|
|
231
199
|
// Returns .* where dot = any byte
|
|
232
200
|
Frag DotStar();
|
|
@@ -298,7 +266,7 @@ int Compiler::AllocInst(int n) {
|
|
|
298
266
|
|
|
299
267
|
// Returns an unmatchable fragment.
|
|
300
268
|
Frag Compiler::NoMatch() {
|
|
301
|
-
return Frag(
|
|
269
|
+
return Frag();
|
|
302
270
|
}
|
|
303
271
|
|
|
304
272
|
// Is a an unmatchable fragment?
|
|
@@ -314,7 +282,7 @@ Frag Compiler::Cat(Frag a, Frag b) {
|
|
|
314
282
|
// Elide no-op.
|
|
315
283
|
Prog::Inst* begin = &inst_[a.begin];
|
|
316
284
|
if (begin->opcode() == kInstNop &&
|
|
317
|
-
a.end.
|
|
285
|
+
a.end.head == (a.begin << 1) &&
|
|
318
286
|
begin->out() == 0) {
|
|
319
287
|
// in case refs to a somewhere
|
|
320
288
|
PatchList::Patch(inst_.data(), a.end, b.begin);
|
|
@@ -324,11 +292,11 @@ Frag Compiler::Cat(Frag a, Frag b) {
|
|
|
324
292
|
// To run backward over string, reverse all concatenations.
|
|
325
293
|
if (reversed_) {
|
|
326
294
|
PatchList::Patch(inst_.data(), b.end, a.begin);
|
|
327
|
-
return Frag(b.begin, a.end);
|
|
295
|
+
return Frag(b.begin, a.end, b.nullable && a.nullable);
|
|
328
296
|
}
|
|
329
297
|
|
|
330
298
|
PatchList::Patch(inst_.data(), a.end, b.begin);
|
|
331
|
-
return Frag(a.begin, b.end);
|
|
299
|
+
return Frag(a.begin, b.end, a.nullable && b.nullable);
|
|
332
300
|
}
|
|
333
301
|
|
|
334
302
|
// Given fragments for a and b, returns fragment for a|b.
|
|
@@ -344,7 +312,8 @@ Frag Compiler::Alt(Frag a, Frag b) {
|
|
|
344
312
|
return NoMatch();
|
|
345
313
|
|
|
346
314
|
inst_[id].InitAlt(a.begin, b.begin);
|
|
347
|
-
return Frag(id, PatchList::Append(inst_.data(), a.end, b.end)
|
|
315
|
+
return Frag(id, PatchList::Append(inst_.data(), a.end, b.end),
|
|
316
|
+
a.nullable || b.nullable);
|
|
348
317
|
}
|
|
349
318
|
|
|
350
319
|
// When capturing submatches in like-Perl mode, a kOpAlt Inst
|
|
@@ -354,27 +323,44 @@ Frag Compiler::Alt(Frag a, Frag b) {
|
|
|
354
323
|
// then the operator is greedy. If out1_ is the repetition
|
|
355
324
|
// (and out_ moves forward), then the operator is non-greedy.
|
|
356
325
|
|
|
357
|
-
// Given a fragment a, returns a fragment for a
|
|
358
|
-
Frag Compiler::
|
|
326
|
+
// Given a fragment for a, returns a fragment for a+ or a+? (if nongreedy)
|
|
327
|
+
Frag Compiler::Plus(Frag a, bool nongreedy) {
|
|
359
328
|
int id = AllocInst(1);
|
|
360
329
|
if (id < 0)
|
|
361
330
|
return NoMatch();
|
|
362
|
-
|
|
363
|
-
PatchList::Patch(inst_.data(), a.end, id);
|
|
331
|
+
PatchList pl;
|
|
364
332
|
if (nongreedy) {
|
|
365
|
-
inst_[id].
|
|
366
|
-
|
|
333
|
+
inst_[id].InitAlt(0, a.begin);
|
|
334
|
+
pl = PatchList::Mk(id << 1);
|
|
367
335
|
} else {
|
|
368
|
-
inst_[id].
|
|
369
|
-
|
|
336
|
+
inst_[id].InitAlt(a.begin, 0);
|
|
337
|
+
pl = PatchList::Mk((id << 1) | 1);
|
|
370
338
|
}
|
|
339
|
+
PatchList::Patch(inst_.data(), a.end, id);
|
|
340
|
+
return Frag(a.begin, pl, a.nullable);
|
|
371
341
|
}
|
|
372
342
|
|
|
373
|
-
// Given a fragment for a, returns a fragment for a
|
|
374
|
-
Frag Compiler::
|
|
375
|
-
//
|
|
376
|
-
|
|
377
|
-
|
|
343
|
+
// Given a fragment for a, returns a fragment for a* or a*? (if nongreedy)
|
|
344
|
+
Frag Compiler::Star(Frag a, bool nongreedy) {
|
|
345
|
+
// When the subexpression is nullable, one Alt isn't enough to guarantee
|
|
346
|
+
// correct priority ordering within the transitive closure. The simplest
|
|
347
|
+
// solution is to handle it as (a+)? instead, which adds the second Alt.
|
|
348
|
+
if (a.nullable)
|
|
349
|
+
return Quest(Plus(a, nongreedy), nongreedy);
|
|
350
|
+
|
|
351
|
+
int id = AllocInst(1);
|
|
352
|
+
if (id < 0)
|
|
353
|
+
return NoMatch();
|
|
354
|
+
PatchList pl;
|
|
355
|
+
if (nongreedy) {
|
|
356
|
+
inst_[id].InitAlt(0, a.begin);
|
|
357
|
+
pl = PatchList::Mk(id << 1);
|
|
358
|
+
} else {
|
|
359
|
+
inst_[id].InitAlt(a.begin, 0);
|
|
360
|
+
pl = PatchList::Mk((id << 1) | 1);
|
|
361
|
+
}
|
|
362
|
+
PatchList::Patch(inst_.data(), a.end, id);
|
|
363
|
+
return Frag(id, pl, true);
|
|
378
364
|
}
|
|
379
365
|
|
|
380
366
|
// Given a fragment for a, returns a fragment for a? or a?? (if nongreedy)
|
|
@@ -392,7 +378,7 @@ Frag Compiler::Quest(Frag a, bool nongreedy) {
|
|
|
392
378
|
inst_[id].InitAlt(a.begin, 0);
|
|
393
379
|
pl = PatchList::Mk((id << 1) | 1);
|
|
394
380
|
}
|
|
395
|
-
return Frag(id, PatchList::Append(inst_.data(), pl, a.end));
|
|
381
|
+
return Frag(id, PatchList::Append(inst_.data(), pl, a.end), true);
|
|
396
382
|
}
|
|
397
383
|
|
|
398
384
|
// Returns a fragment for the byte range lo-hi.
|
|
@@ -401,7 +387,7 @@ Frag Compiler::ByteRange(int lo, int hi, bool foldcase) {
|
|
|
401
387
|
if (id < 0)
|
|
402
388
|
return NoMatch();
|
|
403
389
|
inst_[id].InitByteRange(lo, hi, foldcase, 0);
|
|
404
|
-
return Frag(id, PatchList::Mk(id << 1));
|
|
390
|
+
return Frag(id, PatchList::Mk(id << 1), false);
|
|
405
391
|
}
|
|
406
392
|
|
|
407
393
|
// Returns a no-op fragment. Sometimes unavoidable.
|
|
@@ -410,7 +396,7 @@ Frag Compiler::Nop() {
|
|
|
410
396
|
if (id < 0)
|
|
411
397
|
return NoMatch();
|
|
412
398
|
inst_[id].InitNop(0);
|
|
413
|
-
return Frag(id, PatchList::Mk(id << 1));
|
|
399
|
+
return Frag(id, PatchList::Mk(id << 1), true);
|
|
414
400
|
}
|
|
415
401
|
|
|
416
402
|
// Returns a fragment that signals a match.
|
|
@@ -419,7 +405,7 @@ Frag Compiler::Match(int32_t match_id) {
|
|
|
419
405
|
if (id < 0)
|
|
420
406
|
return NoMatch();
|
|
421
407
|
inst_[id].InitMatch(match_id);
|
|
422
|
-
return Frag(id,
|
|
408
|
+
return Frag(id, kNullPatchList, false);
|
|
423
409
|
}
|
|
424
410
|
|
|
425
411
|
// Returns a fragment matching a particular empty-width op (like ^ or $)
|
|
@@ -428,7 +414,7 @@ Frag Compiler::EmptyWidth(EmptyOp empty) {
|
|
|
428
414
|
if (id < 0)
|
|
429
415
|
return NoMatch();
|
|
430
416
|
inst_[id].InitEmptyWidth(empty, 0);
|
|
431
|
-
return Frag(id, PatchList::Mk(id << 1));
|
|
417
|
+
return Frag(id, PatchList::Mk(id << 1), true);
|
|
432
418
|
}
|
|
433
419
|
|
|
434
420
|
// Given a fragment a, returns a fragment with capturing parens around a.
|
|
@@ -442,7 +428,7 @@ Frag Compiler::Capture(Frag a, int n) {
|
|
|
442
428
|
inst_[id+1].InitCapture(2*n+1, 0);
|
|
443
429
|
PatchList::Patch(inst_.data(), a.end, id+1);
|
|
444
430
|
|
|
445
|
-
return Frag(id, PatchList::Mk((id+1) << 1));
|
|
431
|
+
return Frag(id, PatchList::Mk((id+1) << 1), a.nullable);
|
|
446
432
|
}
|
|
447
433
|
|
|
448
434
|
// A Rune is a name for a Unicode code point.
|
|
@@ -467,7 +453,7 @@ static int MaxRune(int len) {
|
|
|
467
453
|
void Compiler::BeginRange() {
|
|
468
454
|
rune_cache_.clear();
|
|
469
455
|
rune_range_.begin = 0;
|
|
470
|
-
rune_range_.end =
|
|
456
|
+
rune_range_.end = kNullPatchList;
|
|
471
457
|
}
|
|
472
458
|
|
|
473
459
|
int Compiler::UncachedRuneByteSuffix(uint8_t lo, uint8_t hi, bool foldcase,
|
|
@@ -501,8 +487,8 @@ int Compiler::CachedRuneByteSuffix(uint8_t lo, uint8_t hi, bool foldcase,
|
|
|
501
487
|
}
|
|
502
488
|
|
|
503
489
|
bool Compiler::IsCachedRuneByteSuffix(int id) {
|
|
504
|
-
uint8_t lo = inst_[id].
|
|
505
|
-
uint8_t hi = inst_[id].
|
|
490
|
+
uint8_t lo = inst_[id].lo_;
|
|
491
|
+
uint8_t hi = inst_[id].hi_;
|
|
506
492
|
bool foldcase = inst_[id].foldcase() != 0;
|
|
507
493
|
int next = inst_[id].out();
|
|
508
494
|
|
|
@@ -548,9 +534,9 @@ int Compiler::AddSuffixRecursive(int root, int id) {
|
|
|
548
534
|
}
|
|
549
535
|
|
|
550
536
|
int br;
|
|
551
|
-
if (f.end.
|
|
537
|
+
if (f.end.head == 0)
|
|
552
538
|
br = root;
|
|
553
|
-
else if (f.end.
|
|
539
|
+
else if (f.end.head&1)
|
|
554
540
|
br = inst_[f.begin].out1();
|
|
555
541
|
else
|
|
556
542
|
br = inst_[f.begin].out();
|
|
@@ -566,9 +552,9 @@ int Compiler::AddSuffixRecursive(int root, int id) {
|
|
|
566
552
|
// Ensure that the parent points to the clone, not to the original.
|
|
567
553
|
// Note that this could leave the head unreachable except via the cache.
|
|
568
554
|
br = byterange;
|
|
569
|
-
if (f.end.
|
|
555
|
+
if (f.end.head == 0)
|
|
570
556
|
root = br;
|
|
571
|
-
else if (f.end.
|
|
557
|
+
else if (f.end.head&1)
|
|
572
558
|
inst_[f.begin].out1_ = br;
|
|
573
559
|
else
|
|
574
560
|
inst_[f.begin].set_out(br);
|
|
@@ -601,7 +587,7 @@ bool Compiler::ByteRangeEqual(int id1, int id2) {
|
|
|
601
587
|
Frag Compiler::FindByteRange(int root, int id) {
|
|
602
588
|
if (inst_[root].opcode() == kInstByteRange) {
|
|
603
589
|
if (ByteRangeEqual(root, id))
|
|
604
|
-
return Frag(root,
|
|
590
|
+
return Frag(root, kNullPatchList, false);
|
|
605
591
|
else
|
|
606
592
|
return NoMatch();
|
|
607
593
|
}
|
|
@@ -609,7 +595,7 @@ Frag Compiler::FindByteRange(int root, int id) {
|
|
|
609
595
|
while (inst_[root].opcode() == kInstAlt) {
|
|
610
596
|
int out1 = inst_[root].out1();
|
|
611
597
|
if (ByteRangeEqual(out1, id))
|
|
612
|
-
return Frag(root, PatchList::Mk((root << 1) | 1));
|
|
598
|
+
return Frag(root, PatchList::Mk((root << 1) | 1), false);
|
|
613
599
|
|
|
614
600
|
// CharClass is a sorted list of ranges, so if out1 of the root Alt wasn't
|
|
615
601
|
// what we're looking for, then we can stop immediately. Unfortunately, we
|
|
@@ -621,7 +607,7 @@ Frag Compiler::FindByteRange(int root, int id) {
|
|
|
621
607
|
if (inst_[out].opcode() == kInstAlt)
|
|
622
608
|
root = out;
|
|
623
609
|
else if (ByteRangeEqual(out, id))
|
|
624
|
-
return Frag(root, PatchList::Mk(root << 1));
|
|
610
|
+
return Frag(root, PatchList::Mk(root << 1), false);
|
|
625
611
|
else
|
|
626
612
|
return NoMatch();
|
|
627
613
|
}
|
|
@@ -662,48 +648,43 @@ void Compiler::AddRuneRangeLatin1(Rune lo, Rune hi, bool foldcase) {
|
|
|
662
648
|
static_cast<uint8_t>(hi), foldcase, 0));
|
|
663
649
|
}
|
|
664
650
|
|
|
665
|
-
// Table describing how to make a UTF-8 matching machine
|
|
666
|
-
// for the rune range 80-10FFFF (Runeself-Runemax).
|
|
667
|
-
// This range happens frequently enough (for example /./ and /[^a-z]/)
|
|
668
|
-
// and the rune_cache_ map is slow enough that this is worth
|
|
669
|
-
// special handling. Makes compilation of a small expression
|
|
670
|
-
// with a dot in it about 10% faster.
|
|
671
|
-
// The * in the comments below mark whole sequences.
|
|
672
|
-
static struct ByteRangeProg {
|
|
673
|
-
int next;
|
|
674
|
-
int lo;
|
|
675
|
-
int hi;
|
|
676
|
-
} prog_80_10ffff[] = {
|
|
677
|
-
// Two-byte
|
|
678
|
-
{ -1, 0x80, 0xBF, }, // 0: 80-BF
|
|
679
|
-
{ 0, 0xC2, 0xDF, }, // 1: C2-DF 80-BF*
|
|
680
|
-
|
|
681
|
-
// Three-byte
|
|
682
|
-
{ 0, 0xA0, 0xBF, }, // 2: A0-BF 80-BF
|
|
683
|
-
{ 2, 0xE0, 0xE0, }, // 3: E0 A0-BF 80-BF*
|
|
684
|
-
{ 0, 0x80, 0xBF, }, // 4: 80-BF 80-BF
|
|
685
|
-
{ 4, 0xE1, 0xEF, }, // 5: E1-EF 80-BF 80-BF*
|
|
686
|
-
|
|
687
|
-
// Four-byte
|
|
688
|
-
{ 4, 0x90, 0xBF, }, // 6: 90-BF 80-BF 80-BF
|
|
689
|
-
{ 6, 0xF0, 0xF0, }, // 7: F0 90-BF 80-BF 80-BF*
|
|
690
|
-
{ 4, 0x80, 0xBF, }, // 8: 80-BF 80-BF 80-BF
|
|
691
|
-
{ 8, 0xF1, 0xF3, }, // 9: F1-F3 80-BF 80-BF 80-BF*
|
|
692
|
-
{ 4, 0x80, 0x8F, }, // 10: 80-8F 80-BF 80-BF
|
|
693
|
-
{ 10, 0xF4, 0xF4, }, // 11: F4 80-8F 80-BF 80-BF*
|
|
694
|
-
};
|
|
695
|
-
|
|
696
651
|
void Compiler::Add_80_10ffff() {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
652
|
+
// The 80-10FFFF (Runeself-Runemax) rune range occurs frequently enough
|
|
653
|
+
// (for example, for /./ and /[^a-z]/) that it is worth simplifying: by
|
|
654
|
+
// permitting overlong encodings in E0 and F0 sequences and code points
|
|
655
|
+
// over 10FFFF in F4 sequences, the size of the bytecode and the number
|
|
656
|
+
// of equivalence classes are reduced significantly.
|
|
657
|
+
int id;
|
|
658
|
+
if (reversed_) {
|
|
659
|
+
// Prefix factoring matters, but we don't have to handle it here
|
|
660
|
+
// because the rune range trie logic takes care of that already.
|
|
661
|
+
id = UncachedRuneByteSuffix(0xC2, 0xDF, false, 0);
|
|
662
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
|
663
|
+
AddSuffix(id);
|
|
664
|
+
|
|
665
|
+
id = UncachedRuneByteSuffix(0xE0, 0xEF, false, 0);
|
|
666
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
|
667
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
|
668
|
+
AddSuffix(id);
|
|
669
|
+
|
|
670
|
+
id = UncachedRuneByteSuffix(0xF0, 0xF4, false, 0);
|
|
671
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
|
672
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
|
673
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
|
674
|
+
AddSuffix(id);
|
|
675
|
+
} else {
|
|
676
|
+
// Suffix factoring matters - and we do have to handle it here.
|
|
677
|
+
int cont1 = UncachedRuneByteSuffix(0x80, 0xBF, false, 0);
|
|
678
|
+
id = UncachedRuneByteSuffix(0xC2, 0xDF, false, cont1);
|
|
679
|
+
AddSuffix(id);
|
|
680
|
+
|
|
681
|
+
int cont2 = UncachedRuneByteSuffix(0x80, 0xBF, false, cont1);
|
|
682
|
+
id = UncachedRuneByteSuffix(0xE0, 0xEF, false, cont2);
|
|
683
|
+
AddSuffix(id);
|
|
684
|
+
|
|
685
|
+
int cont3 = UncachedRuneByteSuffix(0x80, 0xBF, false, cont2);
|
|
686
|
+
id = UncachedRuneByteSuffix(0xF0, 0xF4, false, cont3);
|
|
687
|
+
AddSuffix(id);
|
|
707
688
|
}
|
|
708
689
|
}
|
|
709
690
|
|
|
@@ -711,9 +692,8 @@ void Compiler::AddRuneRangeUTF8(Rune lo, Rune hi, bool foldcase) {
|
|
|
711
692
|
if (lo > hi)
|
|
712
693
|
return;
|
|
713
694
|
|
|
714
|
-
// Pick off 80-10FFFF as a common special case
|
|
715
|
-
|
|
716
|
-
if (lo == 0x80 && hi == 0x10ffff && !reversed_) {
|
|
695
|
+
// Pick off 80-10FFFF as a common special case.
|
|
696
|
+
if (lo == 0x80 && hi == 0x10ffff) {
|
|
717
697
|
Add_80_10ffff();
|
|
718
698
|
return;
|
|
719
699
|
}
|
|
@@ -809,8 +789,8 @@ void Compiler::AddRuneRangeUTF8(Rune lo, Rune hi, bool foldcase) {
|
|
|
809
789
|
// Should not be called.
|
|
810
790
|
Frag Compiler::Copy(Frag arg) {
|
|
811
791
|
// We're using WalkExponential; there should be no copying.
|
|
812
|
-
LOG(DFATAL) << "Compiler::Copy called!";
|
|
813
792
|
failed_ = true;
|
|
793
|
+
LOG(DFATAL) << "Compiler::Copy called!";
|
|
814
794
|
return NoMatch();
|
|
815
795
|
}
|
|
816
796
|
|
|
@@ -936,8 +916,8 @@ Frag Compiler::PostVisit(Regexp* re, Frag, Frag, Frag* child_frags,
|
|
|
936
916
|
CharClass* cc = re->cc();
|
|
937
917
|
if (cc->empty()) {
|
|
938
918
|
// This can't happen.
|
|
939
|
-
LOG(DFATAL) << "No ranges in char class";
|
|
940
919
|
failed_ = true;
|
|
920
|
+
LOG(DFATAL) << "No ranges in char class";
|
|
941
921
|
return NoMatch();
|
|
942
922
|
}
|
|
943
923
|
|
|
@@ -994,8 +974,8 @@ Frag Compiler::PostVisit(Regexp* re, Frag, Frag, Frag* child_frags,
|
|
|
994
974
|
case kRegexpNoWordBoundary:
|
|
995
975
|
return EmptyWidth(kEmptyNonWordBoundary);
|
|
996
976
|
}
|
|
997
|
-
LOG(DFATAL) << "Missing case in Compiler: " << re->op();
|
|
998
977
|
failed_ = true;
|
|
978
|
+
LOG(DFATAL) << "Missing case in Compiler: " << re->op();
|
|
999
979
|
return NoMatch();
|
|
1000
980
|
}
|
|
1001
981
|
|
|
@@ -1095,8 +1075,6 @@ static bool IsAnchorEnd(Regexp** pre, int depth) {
|
|
|
1095
1075
|
|
|
1096
1076
|
void Compiler::Setup(Regexp::ParseFlags flags, int64_t max_mem,
|
|
1097
1077
|
RE2::Anchor anchor) {
|
|
1098
|
-
prog_->set_flags(flags);
|
|
1099
|
-
|
|
1100
1078
|
if (flags & Regexp::Latin1)
|
|
1101
1079
|
encoding_ = kEncodingLatin1;
|
|
1102
1080
|
max_mem_ = max_mem;
|
|
@@ -1117,14 +1095,11 @@ void Compiler::Setup(Regexp::ParseFlags flags, int64_t max_mem,
|
|
|
1117
1095
|
// on the program.)
|
|
1118
1096
|
if (m >= 1<<24)
|
|
1119
1097
|
m = 1<<24;
|
|
1120
|
-
|
|
1121
1098
|
// Inst imposes its own limit (currently bigger than 2^24 but be safe).
|
|
1122
1099
|
if (m > Prog::Inst::kMaxInst)
|
|
1123
1100
|
m = Prog::Inst::kMaxInst;
|
|
1124
|
-
|
|
1125
1101
|
max_ninst_ = static_cast<int>(m);
|
|
1126
1102
|
}
|
|
1127
|
-
|
|
1128
1103
|
anchor_ = anchor;
|
|
1129
1104
|
}
|
|
1130
1105
|
|
|
@@ -1178,10 +1153,10 @@ Prog* Compiler::Compile(Regexp* re, bool reversed, int64_t max_mem) {
|
|
|
1178
1153
|
c.prog_->set_start_unanchored(all.begin);
|
|
1179
1154
|
|
|
1180
1155
|
// Hand ownership of prog_ to caller.
|
|
1181
|
-
return c.Finish();
|
|
1156
|
+
return c.Finish(re);
|
|
1182
1157
|
}
|
|
1183
1158
|
|
|
1184
|
-
Prog* Compiler::Finish() {
|
|
1159
|
+
Prog* Compiler::Finish(Regexp* re) {
|
|
1185
1160
|
if (failed_)
|
|
1186
1161
|
return NULL;
|
|
1187
1162
|
|
|
@@ -1198,6 +1173,13 @@ Prog* Compiler::Finish() {
|
|
|
1198
1173
|
prog_->Flatten();
|
|
1199
1174
|
prog_->ComputeByteMap();
|
|
1200
1175
|
|
|
1176
|
+
if (!prog_->reversed()) {
|
|
1177
|
+
std::string prefix;
|
|
1178
|
+
bool prefix_foldcase;
|
|
1179
|
+
if (re->RequiredPrefixForAccel(&prefix, &prefix_foldcase))
|
|
1180
|
+
prog_->ConfigurePrefixAccel(prefix, prefix_foldcase);
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1201
1183
|
// Record remaining memory for DFA.
|
|
1202
1184
|
if (max_mem_ <= 0) {
|
|
1203
1185
|
prog_->set_dfa_mem(1<<20);
|
|
@@ -1254,7 +1236,7 @@ Prog* Compiler::CompileSet(Regexp* re, RE2::Anchor anchor, int64_t max_mem) {
|
|
|
1254
1236
|
c.prog_->set_start(all.begin);
|
|
1255
1237
|
c.prog_->set_start_unanchored(all.begin);
|
|
1256
1238
|
|
|
1257
|
-
Prog* prog = c.Finish();
|
|
1239
|
+
Prog* prog = c.Finish(re);
|
|
1258
1240
|
if (prog == NULL)
|
|
1259
1241
|
return NULL;
|
|
1260
1242
|
|
|
@@ -1276,4 +1258,4 @@ Prog* Prog::CompileSet(Regexp* re, RE2::Anchor anchor, int64_t max_mem) {
|
|
|
1276
1258
|
return Compiler::CompileSet(re, anchor, max_mem);
|
|
1277
1259
|
}
|
|
1278
1260
|
|
|
1279
|
-
} // namespace
|
|
1261
|
+
} // namespace re2
|