duckdb 0.8.1-dev65.0 → 0.8.1
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 +8 -8
- package/package.json +3 -1
- package/src/duckdb/extension/icu/icu-datepart.cpp +2 -2
- package/src/duckdb/extension/icu/icu-extension.cpp +1 -1
- package/src/duckdb/extension/icu/icu-makedate.cpp +5 -4
- package/src/duckdb/extension/icu/icu-strptime.cpp +1 -1
- package/src/duckdb/extension/icu/third_party/icu/i18n/nfsubs.cpp +0 -2
- package/src/duckdb/extension/json/buffered_json_reader.cpp +23 -14
- package/src/duckdb/extension/json/include/buffered_json_reader.hpp +6 -6
- package/src/duckdb/extension/json/include/json_common.hpp +13 -3
- package/src/duckdb/extension/json/include/json_executors.hpp +1 -1
- package/src/duckdb/extension/json/include/json_scan.hpp +5 -2
- package/src/duckdb/extension/json/json_functions/json_contains.cpp +5 -0
- package/src/duckdb/extension/json/json_functions/json_create.cpp +16 -16
- package/src/duckdb/extension/json/json_functions/json_merge_patch.cpp +3 -3
- package/src/duckdb/extension/json/json_functions/json_serialize_sql.cpp +2 -2
- package/src/duckdb/extension/json/json_functions/json_structure.cpp +5 -3
- package/src/duckdb/extension/json/json_functions/json_transform.cpp +12 -12
- package/src/duckdb/extension/json/json_functions/read_json.cpp +2 -1
- package/src/duckdb/extension/json/json_functions.cpp +6 -3
- package/src/duckdb/extension/json/json_scan.cpp +43 -27
- package/src/duckdb/extension/parquet/column_reader.cpp +57 -52
- package/src/duckdb/extension/parquet/column_writer.cpp +57 -45
- package/src/duckdb/extension/parquet/include/cast_column_reader.hpp +1 -1
- package/src/duckdb/extension/parquet/include/column_reader.hpp +5 -4
- package/src/duckdb/extension/parquet/include/column_writer.hpp +24 -0
- package/src/duckdb/extension/parquet/include/decode_utils.hpp +6 -0
- package/src/duckdb/extension/parquet/include/list_column_reader.hpp +1 -1
- package/src/duckdb/extension/parquet/include/parquet_dbp_decoder.hpp +4 -4
- package/src/duckdb/extension/parquet/include/parquet_rle_bp_decoder.hpp +4 -5
- package/src/duckdb/extension/parquet/include/resizable_buffer.hpp +4 -4
- package/src/duckdb/extension/parquet/include/row_number_column_reader.hpp +1 -1
- package/src/duckdb/extension/parquet/include/struct_column_reader.hpp +1 -1
- package/src/duckdb/extension/parquet/parquet-extension.cpp +27 -2
- package/src/duckdb/extension/parquet/parquet_metadata.cpp +1 -1
- package/src/duckdb/extension/parquet/parquet_reader.cpp +18 -18
- package/src/duckdb/extension/parquet/parquet_statistics.cpp +23 -26
- package/src/duckdb/extension/parquet/parquet_timestamp.cpp +2 -2
- package/src/duckdb/extension/parquet/parquet_writer.cpp +3 -3
- package/src/duckdb/extension/parquet/zstd_file_system.cpp +3 -3
- package/src/duckdb/src/catalog/catalog.cpp +5 -17
- package/src/duckdb/src/catalog/catalog_entry/duck_table_entry.cpp +7 -1
- package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +121 -0
- package/src/duckdb/src/catalog/catalog_search_path.cpp +49 -12
- package/src/duckdb/src/catalog/catalog_set.cpp +1 -1
- package/src/duckdb/src/catalog/default/default_types.cpp +9 -84
- package/src/duckdb/src/catalog/dependency_manager.cpp +2 -2
- package/src/duckdb/src/common/adbc/adbc.cpp +118 -12
- package/src/duckdb/src/common/adbc/driver_manager.cpp +0 -20
- package/src/duckdb/src/common/arrow/arrow_appender.cpp +12 -12
- package/src/duckdb/src/common/arrow/arrow_converter.cpp +11 -12
- package/src/duckdb/src/common/arrow/arrow_wrapper.cpp +11 -10
- package/src/duckdb/src/common/checksum.cpp +1 -1
- package/src/duckdb/src/common/compressed_file_system.cpp +6 -6
- package/src/duckdb/src/common/crypto/md5.cpp +9 -9
- package/src/duckdb/src/common/exception.cpp +4 -1
- package/src/duckdb/src/common/exception_format_value.cpp +24 -15
- package/src/duckdb/src/common/field_writer.cpp +1 -1
- package/src/duckdb/src/common/fsst.cpp +11 -6
- package/src/duckdb/src/common/gzip_file_system.cpp +8 -8
- package/src/duckdb/src/common/hive_partitioning.cpp +1 -1
- package/src/duckdb/src/common/local_file_system.cpp +11 -11
- package/src/duckdb/src/common/multi_file_reader.cpp +3 -0
- package/src/duckdb/src/common/operator/cast_operators.cpp +1 -1
- package/src/duckdb/src/common/pipe_file_system.cpp +2 -2
- package/src/duckdb/src/common/radix_partitioning.cpp +2 -2
- package/src/duckdb/src/common/random_engine.cpp +1 -1
- package/src/duckdb/src/common/row_operations/row_heap_gather.cpp +1 -1
- package/src/duckdb/src/common/row_operations/row_heap_scatter.cpp +5 -5
- package/src/duckdb/src/common/row_operations/row_match.cpp +1 -1
- package/src/duckdb/src/common/row_operations/row_radix_scatter.cpp +2 -2
- package/src/duckdb/src/common/row_operations/row_scatter.cpp +4 -4
- package/src/duckdb/src/common/serializer/binary_deserializer.cpp +1 -1
- package/src/duckdb/src/common/serializer/binary_serializer.cpp +3 -3
- package/src/duckdb/src/common/serializer.cpp +1 -1
- package/src/duckdb/src/common/sort/comparators.cpp +1 -1
- package/src/duckdb/src/common/sort/merge_sorter.cpp +7 -2
- package/src/duckdb/src/common/sort/partition_state.cpp +2 -2
- package/src/duckdb/src/common/types/bit.cpp +5 -5
- package/src/duckdb/src/common/types/blob.cpp +8 -8
- package/src/duckdb/src/common/types/column/column_data_allocator.cpp +4 -4
- package/src/duckdb/src/common/types/column/column_data_collection.cpp +3 -3
- package/src/duckdb/src/common/types/column/column_data_collection_segment.cpp +1 -1
- package/src/duckdb/src/common/types/column/partitioned_column_data.cpp +2 -2
- package/src/duckdb/src/common/types/hash.cpp +2 -2
- package/src/duckdb/src/common/types/hyperloglog.cpp +22 -21
- package/src/duckdb/src/common/types/list_segment.cpp +77 -49
- package/src/duckdb/src/common/types/row/partitioned_tuple_data.cpp +1 -1
- package/src/duckdb/src/common/types/row/row_data_collection_scanner.cpp +5 -4
- package/src/duckdb/src/common/types/row/tuple_data_allocator.cpp +5 -3
- package/src/duckdb/src/common/types/row/tuple_data_scatter_gather.cpp +61 -24
- package/src/duckdb/src/common/types/string_heap.cpp +1 -1
- package/src/duckdb/src/common/types/time.cpp +2 -8
- package/src/duckdb/src/common/types/timestamp.cpp +37 -1
- package/src/duckdb/src/common/types/value.cpp +3 -2
- package/src/duckdb/src/common/types/vector.cpp +98 -101
- package/src/duckdb/src/common/types/vector_cache.cpp +6 -6
- package/src/duckdb/src/common/types/vector_constants.cpp +2 -1
- package/src/duckdb/src/common/types.cpp +48 -33
- package/src/duckdb/src/common/vector_operations/boolean_operators.cpp +2 -2
- package/src/duckdb/src/common/vector_operations/is_distinct_from.cpp +12 -12
- package/src/duckdb/src/common/vector_operations/vector_hash.cpp +13 -11
- package/src/duckdb/src/common/vector_operations/vector_storage.cpp +1 -1
- package/src/duckdb/src/core_functions/aggregate/algebraic/avg.cpp +30 -33
- package/src/duckdb/src/core_functions/aggregate/algebraic/covar.cpp +0 -4
- package/src/duckdb/src/core_functions/aggregate/distributive/approx_count.cpp +33 -36
- package/src/duckdb/src/core_functions/aggregate/distributive/arg_min_max.cpp +53 -66
- package/src/duckdb/src/core_functions/aggregate/distributive/bitagg.cpp +48 -48
- package/src/duckdb/src/core_functions/aggregate/distributive/bitstring_agg.cpp +44 -44
- package/src/duckdb/src/core_functions/aggregate/distributive/bool.cpp +32 -32
- package/src/duckdb/src/core_functions/aggregate/distributive/entropy.cpp +34 -34
- package/src/duckdb/src/core_functions/aggregate/distributive/kurtosis.cpp +30 -31
- package/src/duckdb/src/core_functions/aggregate/distributive/minmax.cpp +91 -103
- package/src/duckdb/src/core_functions/aggregate/distributive/product.cpp +17 -17
- package/src/duckdb/src/core_functions/aggregate/distributive/skew.cpp +25 -27
- package/src/duckdb/src/core_functions/aggregate/distributive/string_agg.cpp +37 -38
- package/src/duckdb/src/core_functions/aggregate/distributive/sum.cpp +22 -22
- package/src/duckdb/src/core_functions/aggregate/holistic/approximate_quantile.cpp +49 -85
- package/src/duckdb/src/core_functions/aggregate/holistic/mode.cpp +49 -51
- package/src/duckdb/src/core_functions/aggregate/holistic/quantile.cpp +116 -134
- package/src/duckdb/src/core_functions/aggregate/holistic/reservoir_quantile.cpp +63 -100
- package/src/duckdb/src/core_functions/aggregate/nested/histogram.cpp +24 -26
- package/src/duckdb/src/core_functions/aggregate/nested/list.cpp +22 -23
- package/src/duckdb/src/core_functions/aggregate/regression/regr_avg.cpp +16 -18
- package/src/duckdb/src/core_functions/aggregate/regression/regr_intercept.cpp +22 -25
- package/src/duckdb/src/core_functions/aggregate/regression/regr_r2.cpp +19 -24
- package/src/duckdb/src/core_functions/aggregate/regression/regr_sxx_syy.cpp +18 -23
- package/src/duckdb/src/core_functions/aggregate/regression/regr_sxy.cpp +14 -18
- package/src/duckdb/src/core_functions/function_list.cpp +1 -0
- package/src/duckdb/src/core_functions/scalar/blob/base64.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/date/date_part.cpp +46 -46
- package/src/duckdb/src/core_functions/scalar/date/make_date.cpp +3 -0
- package/src/duckdb/src/core_functions/scalar/date/strftime.cpp +2 -2
- package/src/duckdb/src/core_functions/scalar/generic/current_setting.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/generic/least.cpp +2 -2
- package/src/duckdb/src/core_functions/scalar/generic/stats.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/generic/system_functions.cpp +14 -0
- package/src/duckdb/src/core_functions/scalar/list/array_slice.cpp +4 -4
- package/src/duckdb/src/core_functions/scalar/list/flatten.cpp +2 -4
- package/src/duckdb/src/core_functions/scalar/list/list_aggregates.cpp +26 -9
- package/src/duckdb/src/core_functions/scalar/list/list_lambdas.cpp +7 -9
- package/src/duckdb/src/core_functions/scalar/list/list_sort.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/map/cardinality.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/map/map.cpp +2 -2
- package/src/duckdb/src/core_functions/scalar/map/map_concat.cpp +4 -1
- package/src/duckdb/src/core_functions/scalar/map/map_extract.cpp +5 -9
- package/src/duckdb/src/core_functions/scalar/math/numeric.cpp +6 -6
- package/src/duckdb/src/core_functions/scalar/string/starts_with.cpp +3 -2
- package/src/duckdb/src/core_functions/scalar/string/string_split.cpp +4 -4
- package/src/duckdb/src/core_functions/scalar/string/trim.cpp +1 -1
- package/src/duckdb/src/core_functions/scalar/union/union_extract.cpp +1 -1
- package/src/duckdb/src/execution/adaptive_filter.cpp +1 -1
- package/src/duckdb/src/execution/expression_executor/execute_case.cpp +10 -10
- package/src/duckdb/src/execution/expression_executor/execute_conjunction.cpp +7 -7
- package/src/duckdb/src/execution/expression_executor.cpp +28 -28
- package/src/duckdb/src/execution/index/art/art.cpp +110 -39
- package/src/duckdb/src/execution/index/art/fixed_size_allocator.cpp +23 -5
- package/src/duckdb/src/execution/index/art/leaf.cpp +11 -11
- package/src/duckdb/src/execution/index/art/leaf_segment.cpp +10 -0
- package/src/duckdb/src/execution/index/art/node.cpp +48 -35
- package/src/duckdb/src/execution/index/art/node16.cpp +3 -0
- package/src/duckdb/src/execution/index/art/node256.cpp +1 -0
- package/src/duckdb/src/execution/index/art/node4.cpp +3 -0
- package/src/duckdb/src/execution/index/art/node48.cpp +2 -0
- package/src/duckdb/src/execution/index/art/prefix.cpp +2 -0
- package/src/duckdb/src/execution/join_hashtable.cpp +6 -4
- package/src/duckdb/src/execution/nested_loop_join/nested_loop_join_inner.cpp +4 -4
- package/src/duckdb/src/execution/nested_loop_join/nested_loop_join_mark.cpp +2 -2
- package/src/duckdb/src/execution/operator/aggregate/distinct_aggregate_data.cpp +1 -1
- package/src/duckdb/src/execution/operator/aggregate/physical_perfecthash_aggregate.cpp +1 -1
- package/src/duckdb/src/execution/operator/aggregate/physical_streaming_window.cpp +2 -2
- package/src/duckdb/src/execution/operator/aggregate/physical_ungrouped_aggregate.cpp +4 -4
- package/src/duckdb/src/execution/operator/aggregate/physical_window.cpp +26 -9
- package/src/duckdb/src/execution/operator/filter/physical_filter.cpp +1 -1
- package/src/duckdb/src/execution/operator/helper/physical_reset.cpp +5 -2
- package/src/duckdb/src/execution/operator/helper/physical_set.cpp +5 -1
- package/src/duckdb/src/execution/operator/join/outer_join_marker.cpp +1 -1
- package/src/duckdb/src/execution/operator/join/perfect_hash_join_executor.cpp +1 -1
- package/src/duckdb/src/execution/operator/join/physical_asof_join.cpp +2 -2
- package/src/duckdb/src/execution/operator/join/physical_blockwise_nl_join.cpp +4 -4
- package/src/duckdb/src/execution/operator/join/physical_iejoin.cpp +3 -6
- package/src/duckdb/src/execution/operator/join/physical_index_join.cpp +3 -3
- package/src/duckdb/src/execution/operator/join/physical_nested_loop_join.cpp +3 -3
- package/src/duckdb/src/execution/operator/join/physical_piecewise_merge_join.cpp +3 -3
- package/src/duckdb/src/execution/operator/order/physical_top_n.cpp +1 -1
- package/src/duckdb/src/execution/operator/persistent/buffered_csv_reader.cpp +2 -2
- package/src/duckdb/src/execution/operator/persistent/csv_file_handle.cpp +2 -2
- package/src/duckdb/src/execution/operator/persistent/physical_batch_insert.cpp +2 -3
- package/src/duckdb/src/execution/operator/persistent/physical_insert.cpp +1 -1
- package/src/duckdb/src/execution/operator/projection/physical_pivot.cpp +2 -2
- package/src/duckdb/src/execution/operator/projection/physical_projection.cpp +1 -1
- package/src/duckdb/src/execution/operator/projection/physical_tableinout_function.cpp +1 -0
- package/src/duckdb/src/execution/operator/projection/physical_unnest.cpp +10 -5
- package/src/duckdb/src/execution/operator/scan/physical_column_data_scan.cpp +2 -1
- package/src/duckdb/src/execution/operator/scan/physical_expression_scan.cpp +1 -1
- package/src/duckdb/src/execution/operator/scan/physical_positional_scan.cpp +2 -2
- package/src/duckdb/src/execution/operator/schema/physical_attach.cpp +0 -1
- package/src/duckdb/src/execution/operator/schema/physical_create_index.cpp +29 -3
- package/src/duckdb/src/execution/operator/schema/physical_create_type.cpp +1 -1
- package/src/duckdb/src/execution/perfect_aggregate_hashtable.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan/plan_comparison_join.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan/plan_create_table.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan_generator.cpp +2 -2
- package/src/duckdb/src/execution/radix_partitioned_hashtable.cpp +1 -1
- package/src/duckdb/src/execution/reservoir_sample.cpp +20 -6
- package/src/duckdb/src/execution/window_segment_tree.cpp +8 -6
- package/src/duckdb/src/function/aggregate/distributive/count.cpp +159 -21
- package/src/duckdb/src/function/aggregate/distributive/first.cpp +68 -75
- package/src/duckdb/src/function/aggregate/sorted_aggregate_function.cpp +14 -14
- package/src/duckdb/src/function/cast/cast_function_set.cpp +1 -1
- package/src/duckdb/src/function/cast/decimal_cast.cpp +1 -1
- package/src/duckdb/src/function/cast/enum_casts.cpp +2 -2
- package/src/duckdb/src/function/cast/list_casts.cpp +2 -4
- package/src/duckdb/src/function/cast/string_cast.cpp +11 -11
- package/src/duckdb/src/function/cast/union_casts.cpp +2 -2
- package/src/duckdb/src/function/cast/vector_cast_helpers.cpp +3 -2
- package/src/duckdb/src/function/pragma/pragma_queries.cpp +33 -23
- package/src/duckdb/src/function/scalar/generic/constant_or_null.cpp +1 -1
- package/src/duckdb/src/function/scalar/list/list_concat.cpp +2 -2
- package/src/duckdb/src/function/scalar/list/list_extract.cpp +4 -4
- package/src/duckdb/src/function/scalar/operators/arithmetic.cpp +3 -4
- package/src/duckdb/src/function/scalar/string/concat.cpp +8 -7
- package/src/duckdb/src/function/scalar/string/contains.cpp +4 -4
- package/src/duckdb/src/function/scalar/string/like.cpp +5 -5
- package/src/duckdb/src/function/scalar/string/regexp/regexp_extract_all.cpp +4 -4
- package/src/duckdb/src/function/scalar/string/regexp/regexp_util.cpp +6 -2
- package/src/duckdb/src/function/scalar/string/regexp.cpp +3 -3
- package/src/duckdb/src/function/scalar/string/strip_accents.cpp +1 -1
- package/src/duckdb/src/function/scalar/struct/struct_extract.cpp +1 -1
- package/src/duckdb/src/function/scalar/system/aggregate_export.cpp +27 -25
- package/src/duckdb/src/function/scalar_function.cpp +3 -3
- package/src/duckdb/src/function/table/arrow.cpp +6 -6
- package/src/duckdb/src/function/table/arrow_conversion.cpp +67 -61
- package/src/duckdb/src/function/table/checkpoint.cpp +4 -1
- package/src/duckdb/src/function/table/copy_csv.cpp +11 -7
- package/src/duckdb/src/function/table/glob.cpp +1 -1
- package/src/duckdb/src/function/table/pragma_last_profiling_output.cpp +1 -1
- package/src/duckdb/src/function/table/range.cpp +4 -4
- package/src/duckdb/src/function/table/read_csv.cpp +19 -21
- package/src/duckdb/src/function/table/repeat.cpp +5 -2
- package/src/duckdb/src/function/table/repeat_row.cpp +10 -3
- package/src/duckdb/src/function/table/system/duckdb_functions.cpp +1 -1
- package/src/duckdb/src/function/table/system/pragma_storage_info.cpp +4 -4
- package/src/duckdb/src/function/table/system/test_vector_types.cpp +82 -26
- package/src/duckdb/src/function/table/table_scan.cpp +4 -4
- package/src/duckdb/src/function/table/unnest.cpp +1 -1
- package/src/duckdb/src/function/table/version/pragma_version.cpp +3 -3
- package/src/duckdb/src/include/duckdb/catalog/catalog.hpp +2 -5
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/duck_table_entry.hpp +2 -0
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_catalog_entry.hpp +11 -1
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_search_path.hpp +8 -2
- package/src/duckdb/src/include/duckdb/catalog/default/builtin_types/types.hpp +97 -0
- package/src/duckdb/src/include/duckdb/common/allocator.hpp +15 -4
- package/src/duckdb/src/include/duckdb/common/arrow/arrow_appender.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/arrow/arrow_buffer.hpp +7 -2
- package/src/duckdb/src/include/duckdb/common/arrow/arrow_converter.hpp +2 -3
- package/src/duckdb/src/include/duckdb/common/arrow/arrow_options.hpp +8 -1
- package/src/duckdb/src/include/duckdb/common/arrow/result_arrow_wrapper.hpp +0 -1
- package/src/duckdb/src/include/duckdb/common/bit_utils.hpp +16 -22
- package/src/duckdb/src/include/duckdb/common/crypto/md5.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/exception.hpp +5 -2
- package/src/duckdb/src/include/duckdb/common/field_writer.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/file_system.hpp +11 -0
- package/src/duckdb/src/include/duckdb/common/fsst.hpp +2 -3
- package/src/duckdb/src/include/duckdb/common/radix.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/serializer/binary_deserializer.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/serializer/binary_serializer.hpp +4 -1
- package/src/duckdb/src/include/duckdb/common/serializer.hpp +4 -4
- package/src/duckdb/src/include/duckdb/common/typedefs.hpp +30 -0
- package/src/duckdb/src/include/duckdb/common/types/column/partitioned_column_data.hpp +12 -0
- package/src/duckdb/src/include/duckdb/common/types/hyperloglog.hpp +6 -2
- package/src/duckdb/src/include/duckdb/common/types/null_value.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/row/partitioned_tuple_data.hpp +12 -0
- package/src/duckdb/src/include/duckdb/common/types/string_type.hpp +10 -10
- package/src/duckdb/src/include/duckdb/common/types/time.hpp +2 -0
- package/src/duckdb/src/include/duckdb/common/types/timestamp.hpp +4 -14
- package/src/duckdb/src/include/duckdb/common/types/value.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/vector.hpp +9 -0
- package/src/duckdb/src/include/duckdb/common/types/vector_buffer.hpp +18 -6
- package/src/duckdb/src/include/duckdb/common/vector_operations/aggregate_executor.hpp +112 -76
- package/src/duckdb/src/include/duckdb/common/vector_operations/binary_executor.hpp +16 -15
- package/src/duckdb/src/include/duckdb/common/vector_operations/generic_executor.hpp +11 -11
- package/src/duckdb/src/include/duckdb/common/vector_operations/ternary_executor.hpp +23 -19
- package/src/duckdb/src/include/duckdb/common/vector_operations/unary_executor.hpp +3 -3
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/algebraic/corr.hpp +20 -24
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/algebraic/covar.hpp +36 -39
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/algebraic/stddev.hpp +57 -53
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/regression/regr_count.hpp +8 -9
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/regression/regr_slope.hpp +16 -18
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/sum_helpers.hpp +7 -8
- package/src/duckdb/src/include/duckdb/core_functions/scalar/generic_functions.hpp +9 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/map_functions.hpp +2 -6
- package/src/duckdb/src/include/duckdb/core_functions/scalar/string_functions.hpp +16 -36
- package/src/duckdb/src/include/duckdb/execution/expression_executor_state.hpp +14 -2
- package/src/duckdb/src/include/duckdb/execution/index/art/art.hpp +13 -7
- package/src/duckdb/src/include/duckdb/execution/index/art/fixed_size_allocator.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/index/art/leaf.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/index/art/leaf_segment.hpp +2 -0
- package/src/duckdb/src/include/duckdb/execution/index/art/node.hpp +13 -3
- package/src/duckdb/src/include/duckdb/execution/index/art/node48.hpp +1 -0
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_result_collector.hpp +3 -0
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/csv_buffer.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/physical_operator.hpp +5 -2
- package/src/duckdb/src/include/duckdb/execution/physical_operator_states.hpp +12 -12
- package/src/duckdb/src/include/duckdb/function/aggregate_function.hpp +9 -30
- package/src/duckdb/src/include/duckdb/function/aggregate_state.hpp +95 -0
- package/src/duckdb/src/include/duckdb/function/cast/default_casts.hpp +13 -2
- package/src/duckdb/src/include/duckdb/function/cast/vector_cast_helpers.hpp +4 -4
- package/src/duckdb/src/include/duckdb/function/compression_function.hpp +44 -0
- package/src/duckdb/src/include/duckdb/function/copy_function.hpp +6 -6
- package/src/duckdb/src/include/duckdb/function/function.hpp +3 -3
- package/src/duckdb/src/include/duckdb/function/function_serialization.hpp +4 -2
- package/src/duckdb/src/include/duckdb/function/macro_function.hpp +2 -2
- package/src/duckdb/src/include/duckdb/function/scalar/list/contains_or_position.hpp +3 -3
- package/src/duckdb/src/include/duckdb/function/scalar/nested_functions.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/scalar_function.hpp +4 -3
- package/src/duckdb/src/include/duckdb/function/table_function.hpp +9 -8
- package/src/duckdb/src/include/duckdb/main/attached_database.hpp +4 -1
- package/src/duckdb/src/include/duckdb/main/capi/capi_internal.hpp +3 -1
- package/src/duckdb/src/include/duckdb/main/capi/cast/utils.hpp +1 -1
- package/src/duckdb/src/include/duckdb/main/config.hpp +5 -0
- package/src/duckdb/src/include/duckdb/main/database_manager.hpp +1 -0
- package/src/duckdb/src/include/duckdb/main/extension_entries.hpp +142 -136
- package/src/duckdb/src/include/duckdb/main/materialized_query_result.hpp +3 -0
- package/src/duckdb/src/include/duckdb/main/pending_query_result.hpp +3 -0
- package/src/duckdb/src/include/duckdb/main/query_result.hpp +23 -0
- package/src/duckdb/src/include/duckdb/main/relation.hpp +12 -0
- package/src/duckdb/src/include/duckdb/main/settings.hpp +19 -0
- package/src/duckdb/src/include/duckdb/main/stream_query_result.hpp +3 -0
- package/src/duckdb/src/include/duckdb/optimizer/join_order/cardinality_estimator.hpp +2 -2
- package/src/duckdb/src/include/duckdb/optimizer/unnest_rewriter.hpp +4 -0
- package/src/duckdb/src/include/duckdb/parallel/meta_pipeline.hpp +12 -3
- package/src/duckdb/src/include/duckdb/parser/base_expression.hpp +6 -12
- package/src/duckdb/src/include/duckdb/parser/constraint.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/expression/between_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/bound_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/case_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/cast_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/collate_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/columnref_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/comparison_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/conjunction_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/constant_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/function_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/lambda_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/operator_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/parameter_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/expression/subquery_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression/window_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/expression_map.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/parsed_data/parse_info.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_expression.hpp +5 -1
- package/src/duckdb/src/include/duckdb/parser/parser.hpp +2 -0
- package/src/duckdb/src/include/duckdb/parser/query_node.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/result_modifier.hpp +36 -5
- package/src/duckdb/src/include/duckdb/parser/sql_statement.hpp +7 -4
- package/src/duckdb/src/include/duckdb/parser/statement/select_statement.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/basetableref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/emptytableref.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/tableref/expressionlistref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/joinref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/pivotref.hpp +3 -3
- package/src/duckdb/src/include/duckdb/parser/tableref/subqueryref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/table_function_ref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref.hpp +4 -3
- package/src/duckdb/src/include/duckdb/parser/transformer.hpp +106 -92
- package/src/duckdb/src/include/duckdb/planner/bind_context.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/bound_constraint.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/bound_query_node.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/bound_result_modifier.hpp +37 -1
- package/src/duckdb/src/include/duckdb/planner/bound_tableref.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/expression/bound_aggregate_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_between_expression.hpp +1 -1
- 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_columnref_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_comparison_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_conjunction_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_constant_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_function_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_lambda_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_lambdaref_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_operator_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_parameter_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_reference_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_subquery_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_unnest_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression/bound_window_expression.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression.hpp +5 -7
- package/src/duckdb/src/include/duckdb/planner/expression_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/filter/conjunction_filter.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/filter/constant_filter.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/filter/null_filter.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/logical_operator.hpp +7 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_copy_to_file.hpp +6 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_execute.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_explain.hpp +5 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_get.hpp +5 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pivot.hpp +3 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pragma.hpp +6 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_prepare.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/table_binding.hpp +26 -0
- package/src/duckdb/src/include/duckdb/planner/table_filter.hpp +17 -0
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_pivotref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/algorithm/byte_reader.hpp +4 -0
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_analyze.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_compress.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_analyze.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_compress.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/data_table.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/in_memory_block_manager.hpp +13 -13
- package/src/duckdb/src/include/duckdb/storage/index.hpp +6 -4
- package/src/duckdb/src/include/duckdb/storage/partial_block_manager.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/storage_extension.hpp +0 -6
- package/src/duckdb/src/include/duckdb/storage/storage_manager.hpp +12 -0
- package/src/duckdb/src/include/duckdb/storage/string_uncompressed.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/chunk_info.hpp +25 -2
- package/src/duckdb/src/include/duckdb/storage/table/column_checkpoint_state.hpp +12 -0
- package/src/duckdb/src/include/duckdb/storage/table/column_data.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/list_column_data.hpp +2 -1
- package/src/duckdb/src/include/duckdb/storage/table/row_group.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/table/row_group_collection.hpp +2 -1
- package/src/duckdb/src/include/duckdb/storage/table/scan_state.hpp +22 -0
- package/src/duckdb/src/include/duckdb/storage/table/standard_column_data.hpp +2 -1
- package/src/duckdb/src/include/duckdb/storage/table/struct_column_data.hpp +2 -1
- package/src/duckdb/src/include/duckdb/storage/table_storage_info.hpp +0 -2
- package/src/duckdb/src/include/duckdb/transaction/duck_transaction_manager.hpp +2 -2
- package/src/duckdb/src/include/duckdb/transaction/transaction.hpp +2 -2
- package/src/duckdb/src/main/attached_database.cpp +8 -0
- package/src/duckdb/src/main/capi/appender-c.cpp +5 -5
- package/src/duckdb/src/main/capi/arrow-c.cpp +13 -13
- package/src/duckdb/src/main/capi/cast/from_decimal-c.cpp +1 -1
- package/src/duckdb/src/main/capi/cast/utils-c.cpp +1 -1
- package/src/duckdb/src/main/capi/config-c.cpp +3 -6
- package/src/duckdb/src/main/capi/data_chunk-c.cpp +17 -17
- package/src/duckdb/src/main/capi/duckdb-c.cpp +4 -4
- package/src/duckdb/src/main/capi/duckdb_value-c.cpp +4 -4
- package/src/duckdb/src/main/capi/logical_types-c.cpp +22 -21
- package/src/duckdb/src/main/capi/pending-c.cpp +6 -6
- package/src/duckdb/src/main/capi/prepared-c.cpp +10 -10
- package/src/duckdb/src/main/capi/replacement_scan-c.cpp +6 -6
- package/src/duckdb/src/main/capi/result-c.cpp +23 -23
- package/src/duckdb/src/main/capi/table_function-c.cpp +1 -1
- package/src/duckdb/src/main/client_context.cpp +7 -6
- package/src/duckdb/src/main/config.cpp +2 -0
- package/src/duckdb/src/main/database.cpp +1 -0
- package/src/duckdb/src/main/database_manager.cpp +22 -1
- package/src/duckdb/src/main/error_manager.cpp +1 -1
- package/src/duckdb/src/main/extension/extension_load.cpp +1 -1
- package/src/duckdb/src/main/query_result.cpp +6 -2
- package/src/duckdb/src/main/relation/create_table_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/create_view_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/delete_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/explain_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/insert_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/update_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/write_csv_relation.cpp +1 -1
- package/src/duckdb/src/main/relation/write_parquet_relation.cpp +1 -1
- package/src/duckdb/src/main/relation.cpp +1 -1
- package/src/duckdb/src/main/settings/settings.cpp +41 -6
- package/src/duckdb/src/optimizer/deliminator.cpp +12 -12
- package/src/duckdb/src/optimizer/filter_combiner.cpp +3 -3
- package/src/duckdb/src/optimizer/join_order/cardinality_estimator.cpp +10 -10
- package/src/duckdb/src/optimizer/matcher/expression_matcher.cpp +1 -1
- package/src/duckdb/src/optimizer/pullup/pullup_projection.cpp +2 -2
- package/src/duckdb/src/optimizer/regex_range_filter.cpp +2 -4
- package/src/duckdb/src/optimizer/rule/distributivity.cpp +2 -2
- package/src/duckdb/src/optimizer/statistics/operator/propagate_filter.cpp +6 -6
- package/src/duckdb/src/optimizer/statistics/operator/propagate_get.cpp +2 -2
- package/src/duckdb/src/optimizer/unnest_rewriter.cpp +27 -16
- package/src/duckdb/src/parallel/executor.cpp +39 -15
- package/src/duckdb/src/parallel/meta_pipeline.cpp +17 -3
- package/src/duckdb/src/parser/base_expression.cpp +2 -5
- package/src/duckdb/src/parser/column_definition.cpp +5 -8
- package/src/duckdb/src/parser/expression/between_expression.cpp +4 -4
- package/src/duckdb/src/parser/expression/case_expression.cpp +6 -6
- package/src/duckdb/src/parser/expression/cast_expression.cpp +4 -4
- package/src/duckdb/src/parser/expression/collate_expression.cpp +3 -3
- package/src/duckdb/src/parser/expression/columnref_expression.cpp +4 -4
- package/src/duckdb/src/parser/expression/comparison_expression.cpp +3 -3
- package/src/duckdb/src/parser/expression/conjunction_expression.cpp +2 -2
- package/src/duckdb/src/parser/expression/constant_expression.cpp +2 -2
- package/src/duckdb/src/parser/expression/function_expression.cpp +10 -14
- package/src/duckdb/src/parser/expression/lambda_expression.cpp +2 -2
- package/src/duckdb/src/parser/expression/operator_expression.cpp +4 -4
- package/src/duckdb/src/parser/expression/parameter_expression.cpp +2 -2
- package/src/duckdb/src/parser/expression/positional_reference_expression.cpp +3 -3
- package/src/duckdb/src/parser/expression/star_expression.cpp +9 -9
- package/src/duckdb/src/parser/expression/subquery_expression.cpp +5 -5
- package/src/duckdb/src/parser/expression/window_expression.cpp +13 -24
- package/src/duckdb/src/parser/parsed_data/create_info.cpp +0 -3
- package/src/duckdb/src/parser/parsed_expression.cpp +34 -18
- package/src/duckdb/src/parser/parsed_expression_iterator.cpp +4 -4
- package/src/duckdb/src/parser/parser.cpp +98 -38
- package/src/duckdb/src/parser/query_node/select_node.cpp +6 -13
- package/src/duckdb/src/parser/query_node.cpp +7 -6
- package/src/duckdb/src/parser/result_modifier.cpp +25 -18
- package/src/duckdb/src/parser/statement/select_statement.cpp +3 -3
- package/src/duckdb/src/parser/tableref/basetableref.cpp +4 -4
- package/src/duckdb/src/parser/tableref/emptytableref.cpp +1 -1
- package/src/duckdb/src/parser/tableref/expressionlistref.cpp +5 -5
- package/src/duckdb/src/parser/tableref/joinref.cpp +6 -6
- package/src/duckdb/src/parser/tableref/pivotref.cpp +10 -15
- package/src/duckdb/src/parser/tableref/subqueryref.cpp +3 -3
- package/src/duckdb/src/parser/tableref/table_function.cpp +3 -3
- package/src/duckdb/src/parser/tableref.cpp +12 -3
- package/src/duckdb/src/parser/transform/expression/transform_array_access.cpp +7 -7
- package/src/duckdb/src/parser/transform/expression/transform_bool_expr.cpp +4 -4
- package/src/duckdb/src/parser/transform/expression/transform_boolean_test.cpp +4 -4
- package/src/duckdb/src/parser/transform/expression/transform_case.cpp +8 -10
- package/src/duckdb/src/parser/transform/expression/transform_cast.cpp +7 -9
- package/src/duckdb/src/parser/transform/expression/transform_coalesce.cpp +3 -5
- package/src/duckdb/src/parser/transform/expression/transform_columnref.cpp +22 -22
- package/src/duckdb/src/parser/transform/expression/transform_constant.cpp +2 -2
- package/src/duckdb/src/parser/transform/expression/transform_expression.cpp +42 -44
- package/src/duckdb/src/parser/transform/expression/transform_function.cpp +70 -75
- package/src/duckdb/src/parser/transform/expression/transform_grouping_function.cpp +4 -4
- package/src/duckdb/src/parser/transform/expression/transform_interval.cpp +7 -7
- package/src/duckdb/src/parser/transform/expression/transform_is_null.cpp +4 -5
- package/src/duckdb/src/parser/transform/expression/transform_lambda.cpp +5 -6
- package/src/duckdb/src/parser/transform/expression/transform_operator.cpp +31 -29
- package/src/duckdb/src/parser/transform/expression/transform_param_ref.cpp +13 -14
- package/src/duckdb/src/parser/transform/expression/transform_positional_reference.cpp +4 -4
- package/src/duckdb/src/parser/transform/expression/transform_subquery.cpp +9 -10
- package/src/duckdb/src/parser/transform/helpers/nodetype_to_string.cpp +0 -2
- package/src/duckdb/src/parser/transform/helpers/transform_cte.cpp +28 -32
- package/src/duckdb/src/parser/transform/helpers/transform_groupby.cpp +18 -18
- package/src/duckdb/src/parser/transform/helpers/transform_sample.cpp +3 -3
- package/src/duckdb/src/parser/transform/helpers/transform_typename.cpp +27 -26
- package/src/duckdb/src/parser/transform/statement/transform_alter_sequence.cpp +11 -14
- package/src/duckdb/src/parser/transform/statement/transform_alter_table.cpp +14 -16
- package/src/duckdb/src/parser/transform/statement/transform_attach.cpp +8 -9
- package/src/duckdb/src/parser/transform/statement/transform_call.cpp +2 -5
- package/src/duckdb/src/parser/transform/statement/transform_checkpoint.cpp +4 -6
- package/src/duckdb/src/parser/transform/statement/transform_copy.cpp +22 -23
- package/src/duckdb/src/parser/transform/statement/transform_create_function.cpp +14 -18
- package/src/duckdb/src/parser/transform/statement/transform_create_index.cpp +13 -15
- package/src/duckdb/src/parser/transform/statement/transform_create_schema.cpp +8 -10
- package/src/duckdb/src/parser/transform/statement/transform_create_sequence.cpp +8 -10
- package/src/duckdb/src/parser/transform/statement/transform_create_table.cpp +26 -28
- package/src/duckdb/src/parser/transform/statement/transform_create_table_as.cpp +8 -10
- package/src/duckdb/src/parser/transform/statement/transform_create_type.cpp +12 -15
- package/src/duckdb/src/parser/transform/statement/transform_create_view.cpp +13 -18
- package/src/duckdb/src/parser/transform/statement/transform_delete.cpp +11 -13
- package/src/duckdb/src/parser/transform/statement/transform_detach.cpp +3 -4
- package/src/duckdb/src/parser/transform/statement/transform_drop.cpp +20 -25
- package/src/duckdb/src/parser/transform/statement/transform_explain.cpp +5 -7
- package/src/duckdb/src/parser/transform/statement/transform_export.cpp +5 -6
- package/src/duckdb/src/parser/transform/statement/transform_import.cpp +2 -3
- package/src/duckdb/src/parser/transform/statement/transform_insert.cpp +21 -24
- package/src/duckdb/src/parser/transform/statement/transform_load.cpp +4 -5
- package/src/duckdb/src/parser/transform/statement/transform_pivot_stmt.cpp +7 -7
- package/src/duckdb/src/parser/transform/statement/transform_pragma.cpp +7 -9
- package/src/duckdb/src/parser/transform/statement/transform_prepare.cpp +11 -19
- package/src/duckdb/src/parser/transform/statement/transform_rename.cpp +12 -14
- package/src/duckdb/src/parser/transform/statement/transform_select.cpp +12 -9
- package/src/duckdb/src/parser/transform/statement/transform_select_node.cpp +34 -34
- package/src/duckdb/src/parser/transform/statement/transform_set.cpp +18 -19
- package/src/duckdb/src/parser/transform/statement/transform_show.cpp +5 -7
- package/src/duckdb/src/parser/transform/statement/transform_show_select.cpp +4 -5
- package/src/duckdb/src/parser/transform/statement/transform_transaction.cpp +3 -5
- package/src/duckdb/src/parser/transform/statement/transform_update.cpp +10 -13
- package/src/duckdb/src/parser/transform/statement/transform_upsert.cpp +4 -4
- package/src/duckdb/src/parser/transform/statement/transform_use.cpp +2 -3
- package/src/duckdb/src/parser/transform/statement/transform_vacuum.cpp +6 -10
- package/src/duckdb/src/parser/transform/tableref/transform_base_tableref.cpp +18 -18
- package/src/duckdb/src/parser/transform/tableref/transform_from.cpp +5 -5
- package/src/duckdb/src/parser/transform/tableref/transform_join.cpp +11 -11
- package/src/duckdb/src/parser/transform/tableref/transform_pivot.cpp +30 -27
- package/src/duckdb/src/parser/transform/tableref/transform_subquery.cpp +5 -5
- package/src/duckdb/src/parser/transform/tableref/transform_table_function.cpp +13 -12
- package/src/duckdb/src/parser/transform/tableref/transform_tableref.cpp +8 -8
- package/src/duckdb/src/parser/transformer.cpp +45 -47
- package/src/duckdb/src/planner/bind_context.cpp +9 -10
- package/src/duckdb/src/planner/binder/expression/bind_function_expression.cpp +1 -3
- package/src/duckdb/src/planner/binder/expression/bind_lambda.cpp +1 -1
- package/src/duckdb/src/planner/binder/expression/bind_positional_reference_expression.cpp +8 -3
- package/src/duckdb/src/planner/binder/expression/bind_star_expression.cpp +1 -1
- package/src/duckdb/src/planner/binder/expression/bind_subquery_expression.cpp +6 -3
- package/src/duckdb/src/planner/binder/query_node/bind_select_node.cpp +39 -23
- package/src/duckdb/src/planner/binder/query_node/plan_query_node.cpp +4 -4
- package/src/duckdb/src/planner/binder/statement/bind_create.cpp +1 -28
- package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +18 -1
- package/src/duckdb/src/planner/binder/statement/bind_drop.cpp +0 -25
- package/src/duckdb/src/planner/binder/statement/bind_insert.cpp +2 -2
- package/src/duckdb/src/planner/binder/statement/bind_update.cpp +2 -114
- package/src/duckdb/src/planner/binder/tableref/bind_pivot.cpp +7 -2
- package/src/duckdb/src/planner/binder/tableref/bind_table_function.cpp +7 -2
- package/src/duckdb/src/planner/binder.cpp +1 -1
- package/src/duckdb/src/planner/bound_result_modifier.cpp +30 -11
- package/src/duckdb/src/planner/expression/bound_aggregate_expression.cpp +11 -10
- package/src/duckdb/src/planner/expression/bound_between_expression.cpp +5 -5
- package/src/duckdb/src/planner/expression/bound_case_expression.cpp +5 -5
- package/src/duckdb/src/planner/expression/bound_cast_expression.cpp +3 -3
- package/src/duckdb/src/planner/expression/bound_columnref_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_comparison_expression.cpp +4 -4
- package/src/duckdb/src/planner/expression/bound_conjunction_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_constant_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_default_expression.cpp +7 -1
- package/src/duckdb/src/planner/expression/bound_expression.cpp +1 -1
- package/src/duckdb/src/planner/expression/bound_function_expression.cpp +3 -4
- package/src/duckdb/src/planner/expression/bound_lambda_expression.cpp +4 -5
- package/src/duckdb/src/planner/expression/bound_lambdaref_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_operator_expression.cpp +3 -4
- package/src/duckdb/src/planner/expression/bound_parameter_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_reference_expression.cpp +2 -2
- package/src/duckdb/src/planner/expression/bound_subquery_expression.cpp +1 -1
- package/src/duckdb/src/planner/expression/bound_unnest_expression.cpp +3 -3
- package/src/duckdb/src/planner/expression/bound_window_expression.cpp +8 -21
- package/src/duckdb/src/planner/expression.cpp +18 -0
- package/src/duckdb/src/planner/expression_binder/base_select_binder.cpp +2 -2
- package/src/duckdb/src/planner/expression_binder.cpp +3 -2
- package/src/duckdb/src/planner/expression_iterator.cpp +2 -2
- package/src/duckdb/src/planner/filter/conjunction_filter.cpp +2 -2
- package/src/duckdb/src/planner/filter/constant_filter.cpp +1 -1
- package/src/duckdb/src/planner/logical_operator.cpp +3 -4
- package/src/duckdb/src/planner/logical_operator_visitor.cpp +1 -1
- package/src/duckdb/src/planner/operator/logical_distinct.cpp +5 -4
- package/src/duckdb/src/planner/operator/logical_pivot.cpp +14 -2
- package/src/duckdb/src/planner/planner.cpp +5 -15
- package/src/duckdb/src/planner/table_filter.cpp +1 -1
- package/src/duckdb/src/storage/arena_allocator.cpp +2 -2
- package/src/duckdb/src/storage/buffer/block_handle.cpp +1 -1
- package/src/duckdb/src/storage/checkpoint/write_overflow_strings_to_disk.cpp +2 -2
- package/src/duckdb/src/storage/checkpoint_manager.cpp +3 -3
- package/src/duckdb/src/storage/compression/bitpacking.cpp +8 -8
- package/src/duckdb/src/storage/compression/dictionary_compression.cpp +36 -36
- package/src/duckdb/src/storage/compression/fixed_size_uncompressed.cpp +11 -11
- package/src/duckdb/src/storage/compression/fsst.cpp +34 -34
- package/src/duckdb/src/storage/compression/rle.cpp +8 -8
- package/src/duckdb/src/storage/compression/string_uncompressed.cpp +13 -13
- package/src/duckdb/src/storage/compression/validity_uncompressed.cpp +11 -11
- package/src/duckdb/src/storage/data_table.cpp +12 -10
- package/src/duckdb/src/storage/index.cpp +13 -0
- package/src/duckdb/src/storage/single_file_block_manager.cpp +3 -3
- package/src/duckdb/src/storage/standard_buffer_manager.cpp +3 -3
- package/src/duckdb/src/storage/statistics/list_stats.cpp +1 -1
- package/src/duckdb/src/storage/statistics/numeric_stats.cpp +1 -1
- package/src/duckdb/src/storage/statistics/string_stats.cpp +15 -14
- package/src/duckdb/src/storage/storage_manager.cpp +6 -0
- package/src/duckdb/src/storage/table/chunk_info.cpp +2 -2
- package/src/duckdb/src/storage/table/column_data.cpp +7 -3
- package/src/duckdb/src/storage/table/column_segment.cpp +3 -3
- package/src/duckdb/src/storage/table/list_column_data.cpp +8 -7
- package/src/duckdb/src/storage/table/row_group.cpp +8 -7
- package/src/duckdb/src/storage/table/row_group_collection.cpp +6 -3
- package/src/duckdb/src/storage/table/standard_column_data.cpp +5 -4
- package/src/duckdb/src/storage/table/struct_column_data.cpp +4 -3
- package/src/duckdb/src/storage/table/update_segment.cpp +12 -12
- package/src/duckdb/src/storage/wal_replay.cpp +5 -6
- package/src/duckdb/src/transaction/cleanup_state.cpp +3 -3
- package/src/duckdb/src/transaction/commit_state.cpp +8 -8
- package/src/duckdb/src/transaction/duck_transaction.cpp +9 -7
- package/src/duckdb/src/transaction/duck_transaction_manager.cpp +16 -16
- package/src/duckdb/src/transaction/rollback_state.cpp +3 -3
- package/src/duckdb/src/verification/prepared_statement_verifier.cpp +1 -1
- package/src/duckdb/src/verification/statement_verifier.cpp +3 -4
- package/src/duckdb/third_party/hyperloglog/hyperloglog.hpp +2 -2
- package/src/duckdb/third_party/libpg_query/include/nodes/nodes.hpp +0 -1
- package/src/duckdb/third_party/libpg_query/include/nodes/parsenodes.hpp +0 -14
- package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +12828 -12956
- package/src/duckdb/third_party/pcg/pcg_extras.hpp +1 -1
- package/src/duckdb/third_party/zstd/compress/zstd_compress.cpp +3 -0
- package/src/duckdb/third_party/zstd/include/zstd/compress/zstd_cwksp.h +4 -0
- package/src/duckdb/ub_extension_icu_third_party_icu_i18n.cpp +5 -5
- package/src/duckdb/ub_src_parser_transform_statement.cpp +0 -2
- package/test/extension.test.ts +11 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_database_info.hpp +0 -46
- package/src/duckdb/src/parser/transform/statement/transform_create_database.cpp +0 -28
@@ -95,26 +95,50 @@ void Executor::SchedulePipeline(const shared_ptr<MetaPipeline> &meta_pipeline, S
|
|
95
95
|
|
96
96
|
// create events/stack for this pipeline
|
97
97
|
auto pipeline_event = make_shared<PipelineEvent>(pipeline);
|
98
|
-
|
99
|
-
|
98
|
+
|
99
|
+
auto finish_group = meta_pipeline->GetFinishGroup(pipeline.get());
|
100
|
+
if (finish_group) {
|
101
|
+
// this pipeline is part of a finish group
|
102
|
+
const auto group_entry = event_map.find(*finish_group.get());
|
103
|
+
D_ASSERT(group_entry != event_map.end());
|
104
|
+
auto &group_stack = group_entry->second;
|
105
|
+
PipelineEventStack pipeline_stack(base_stack.pipeline_initialize_event, *pipeline_event,
|
106
|
+
group_stack.pipeline_finish_event, base_stack.pipeline_complete_event);
|
107
|
+
|
108
|
+
// dependencies: base_finish -> pipeline_event -> group_finish
|
109
|
+
pipeline_stack.pipeline_event.AddDependency(base_stack.pipeline_event);
|
110
|
+
group_stack.pipeline_finish_event.AddDependency(pipeline_stack.pipeline_event);
|
111
|
+
|
112
|
+
// add pipeline stack to event map
|
113
|
+
event_map.insert(make_pair(reference<Pipeline>(*pipeline), pipeline_stack));
|
114
|
+
} else if (meta_pipeline->HasFinishEvent(pipeline.get())) {
|
100
115
|
// this pipeline has its own finish event (despite going into the same sink - Finalize twice!)
|
101
116
|
auto pipeline_finish_event = make_shared<PipelineFinishEvent>(pipeline);
|
102
|
-
|
117
|
+
PipelineEventStack pipeline_stack(base_stack.pipeline_initialize_event, *pipeline_event,
|
118
|
+
*pipeline_finish_event, base_stack.pipeline_complete_event);
|
103
119
|
events.push_back(std::move(pipeline_finish_event));
|
104
|
-
|
120
|
+
|
121
|
+
// dependencies: base_finish -> pipeline_event -> pipeline_finish -> base_complete
|
122
|
+
pipeline_stack.pipeline_event.AddDependency(base_stack.pipeline_finish_event);
|
123
|
+
pipeline_stack.pipeline_finish_event.AddDependency(pipeline_stack.pipeline_event);
|
124
|
+
base_stack.pipeline_complete_event.AddDependency(pipeline_stack.pipeline_finish_event);
|
125
|
+
|
126
|
+
// add pipeline stack to event map
|
127
|
+
event_map.insert(make_pair(reference<Pipeline>(*pipeline), pipeline_stack));
|
128
|
+
|
105
129
|
} else {
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
*pipeline_finish_event_ptr, base_stack.pipeline_complete_event);
|
110
|
-
events.push_back(std::move(pipeline_event));
|
130
|
+
// no additional finish event
|
131
|
+
PipelineEventStack pipeline_stack(base_stack.pipeline_initialize_event, *pipeline_event,
|
132
|
+
base_stack.pipeline_finish_event, base_stack.pipeline_complete_event);
|
111
133
|
|
112
|
-
|
113
|
-
|
114
|
-
|
134
|
+
// dependencies: base_initialize -> pipeline_event -> base_finish
|
135
|
+
pipeline_stack.pipeline_event.AddDependency(base_stack.pipeline_initialize_event);
|
136
|
+
base_stack.pipeline_finish_event.AddDependency(pipeline_stack.pipeline_event);
|
115
137
|
|
116
|
-
|
117
|
-
|
138
|
+
// add pipeline stack to event map
|
139
|
+
event_map.insert(make_pair(reference<Pipeline>(*pipeline), pipeline_stack));
|
140
|
+
}
|
141
|
+
events.push_back(std::move(pipeline_event));
|
118
142
|
}
|
119
143
|
|
120
144
|
// add base stack to the event data too
|
@@ -562,7 +586,7 @@ bool Executor::HasResultCollector() {
|
|
562
586
|
|
563
587
|
unique_ptr<QueryResult> Executor::GetResult() {
|
564
588
|
D_ASSERT(HasResultCollector());
|
565
|
-
auto &result_collector = (
|
589
|
+
auto &result_collector = physical_plan->Cast<PhysicalResultCollector>();
|
566
590
|
D_ASSERT(result_collector.sink_state);
|
567
591
|
return result_collector.GetResult(*result_collector.sink_state);
|
568
592
|
}
|
@@ -70,7 +70,6 @@ void MetaPipeline::AssignNextBatchIndex(Pipeline *pipeline) {
|
|
70
70
|
void MetaPipeline::Build(PhysicalOperator &op) {
|
71
71
|
D_ASSERT(pipelines.size() == 1);
|
72
72
|
D_ASSERT(children.empty());
|
73
|
-
D_ASSERT(final_pipelines.empty());
|
74
73
|
op.BuildPipelines(*pipelines.back(), *this);
|
75
74
|
}
|
76
75
|
|
@@ -125,13 +124,28 @@ void MetaPipeline::AddDependenciesFrom(Pipeline *dependant, Pipeline *start, boo
|
|
125
124
|
}
|
126
125
|
|
127
126
|
void MetaPipeline::AddFinishEvent(Pipeline *pipeline) {
|
127
|
+
D_ASSERT(finish_pipelines.find(pipeline) == finish_pipelines.end());
|
128
128
|
finish_pipelines.insert(pipeline);
|
129
|
+
|
130
|
+
// add all pipelines that were added since 'pipeline' was added (including 'pipeline') to the finish group
|
131
|
+
auto it = pipelines.begin();
|
132
|
+
for (; it->get() != pipeline; it++) {
|
133
|
+
}
|
134
|
+
it++;
|
135
|
+
for (; it != pipelines.end(); it++) {
|
136
|
+
finish_map.emplace(it->get(), pipeline);
|
137
|
+
}
|
129
138
|
}
|
130
139
|
|
131
|
-
bool MetaPipeline::HasFinishEvent(Pipeline *pipeline) {
|
140
|
+
bool MetaPipeline::HasFinishEvent(Pipeline *pipeline) const {
|
132
141
|
return finish_pipelines.find(pipeline) != finish_pipelines.end();
|
133
142
|
}
|
134
143
|
|
144
|
+
optional_ptr<Pipeline> MetaPipeline::GetFinishGroup(Pipeline *pipeline) const {
|
145
|
+
auto it = finish_map.find(pipeline);
|
146
|
+
return it == finish_map.end() ? nullptr : it->second;
|
147
|
+
}
|
148
|
+
|
135
149
|
Pipeline *MetaPipeline::CreateUnionPipeline(Pipeline ¤t, bool order_matters) {
|
136
150
|
// create the union pipeline (batch index 0, should be set correctly afterwards)
|
137
151
|
auto union_pipeline = CreatePipeline();
|
@@ -162,7 +176,7 @@ void MetaPipeline::CreateChildPipeline(Pipeline ¤t, PhysicalOperator &op,
|
|
162
176
|
auto child_pipeline = pipelines.back().get();
|
163
177
|
child_pipeline->base_batch_index = current.base_batch_index;
|
164
178
|
|
165
|
-
// child pipeline has a
|
179
|
+
// child pipeline has a dependency (within this MetaPipeline on all pipelines that were scheduled
|
166
180
|
// between 'current' and now (including 'current') - set them up
|
167
181
|
dependencies[child_pipeline].push_back(¤t);
|
168
182
|
AddDependenciesFrom(child_pipeline, last_pipeline, false);
|
@@ -18,11 +18,8 @@ string BaseExpression::GetName() const {
|
|
18
18
|
return !alias.empty() ? alias : ToString();
|
19
19
|
}
|
20
20
|
|
21
|
-
bool BaseExpression::Equals(const BaseExpression
|
22
|
-
if (
|
23
|
-
return false;
|
24
|
-
}
|
25
|
-
if (this->expression_class != other->expression_class || this->type != other->type) {
|
21
|
+
bool BaseExpression::Equals(const BaseExpression &other) const {
|
22
|
+
if (expression_class != other.expression_class || type != other.type) {
|
26
23
|
return false;
|
27
24
|
}
|
28
25
|
return true;
|
@@ -50,6 +50,7 @@ void ColumnDefinition::Serialize(Serializer &serializer) const {
|
|
50
50
|
writer.WriteOptional(default_value);
|
51
51
|
}
|
52
52
|
writer.WriteField<TableColumnType>(category);
|
53
|
+
writer.WriteField<duckdb::CompressionType>(compression_type);
|
53
54
|
writer.Finalize();
|
54
55
|
}
|
55
56
|
|
@@ -59,16 +60,12 @@ ColumnDefinition ColumnDefinition::Deserialize(Deserializer &source) {
|
|
59
60
|
auto column_type = reader.ReadRequiredSerializable<LogicalType, LogicalType>();
|
60
61
|
auto expression = reader.ReadOptional<ParsedExpression>(nullptr);
|
61
62
|
auto category = reader.ReadField<TableColumnType>(TableColumnType::STANDARD);
|
63
|
+
auto compression_type = reader.ReadField<duckdb::CompressionType>(duckdb::CompressionType::COMPRESSION_AUTO);
|
62
64
|
reader.Finalize();
|
63
65
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
case TableColumnType::GENERATED:
|
68
|
-
return ColumnDefinition(column_name, column_type, std::move(expression), TableColumnType::GENERATED);
|
69
|
-
default:
|
70
|
-
throw NotImplementedException("Type not implemented for TableColumnType");
|
71
|
-
}
|
66
|
+
ColumnDefinition result(column_name, column_type, std::move(expression), category);
|
67
|
+
result.compression_type = compression_type;
|
68
|
+
return result;
|
72
69
|
}
|
73
70
|
|
74
71
|
const unique_ptr<ParsedExpression> &ColumnDefinition::DefaultValue() const {
|
@@ -15,14 +15,14 @@ string BetweenExpression::ToString() const {
|
|
15
15
|
return ToString<BetweenExpression, ParsedExpression>(*this);
|
16
16
|
}
|
17
17
|
|
18
|
-
bool BetweenExpression::Equal(const BetweenExpression
|
19
|
-
if (!a
|
18
|
+
bool BetweenExpression::Equal(const BetweenExpression &a, const BetweenExpression &b) {
|
19
|
+
if (!a.input->Equals(*b.input)) {
|
20
20
|
return false;
|
21
21
|
}
|
22
|
-
if (!a
|
22
|
+
if (!a.lower->Equals(*b.lower)) {
|
23
23
|
return false;
|
24
24
|
}
|
25
|
-
if (!a
|
25
|
+
if (!a.upper->Equals(*b.upper)) {
|
26
26
|
return false;
|
27
27
|
}
|
28
28
|
return true;
|
@@ -27,19 +27,19 @@ string CaseExpression::ToString() const {
|
|
27
27
|
return ToString<CaseExpression, ParsedExpression>(*this);
|
28
28
|
}
|
29
29
|
|
30
|
-
bool CaseExpression::Equal(const CaseExpression
|
31
|
-
if (a
|
30
|
+
bool CaseExpression::Equal(const CaseExpression &a, const CaseExpression &b) {
|
31
|
+
if (a.case_checks.size() != b.case_checks.size()) {
|
32
32
|
return false;
|
33
33
|
}
|
34
|
-
for (idx_t i = 0; i < a
|
35
|
-
if (!a
|
34
|
+
for (idx_t i = 0; i < a.case_checks.size(); i++) {
|
35
|
+
if (!a.case_checks[i].when_expr->Equals(*b.case_checks[i].when_expr)) {
|
36
36
|
return false;
|
37
37
|
}
|
38
|
-
if (!a
|
38
|
+
if (!a.case_checks[i].then_expr->Equals(*b.case_checks[i].then_expr)) {
|
39
39
|
return false;
|
40
40
|
}
|
41
41
|
}
|
42
|
-
if (!a
|
42
|
+
if (!a.else_expr->Equals(*b.else_expr)) {
|
43
43
|
return false;
|
44
44
|
}
|
45
45
|
return true;
|
@@ -19,14 +19,14 @@ string CastExpression::ToString() const {
|
|
19
19
|
return ToString<CastExpression, ParsedExpression>(*this);
|
20
20
|
}
|
21
21
|
|
22
|
-
bool CastExpression::Equal(const CastExpression
|
23
|
-
if (!a
|
22
|
+
bool CastExpression::Equal(const CastExpression &a, const CastExpression &b) {
|
23
|
+
if (!a.child->Equals(*b.child)) {
|
24
24
|
return false;
|
25
25
|
}
|
26
|
-
if (a
|
26
|
+
if (a.cast_type != b.cast_type) {
|
27
27
|
return false;
|
28
28
|
}
|
29
|
-
if (a
|
29
|
+
if (a.try_cast != b.try_cast) {
|
30
30
|
return false;
|
31
31
|
}
|
32
32
|
return true;
|
@@ -18,11 +18,11 @@ string CollateExpression::ToString() const {
|
|
18
18
|
return StringUtil::Format("%s COLLATE %s", child->ToString(), SQLIdentifier(collation));
|
19
19
|
}
|
20
20
|
|
21
|
-
bool CollateExpression::Equal(const CollateExpression
|
22
|
-
if (!a
|
21
|
+
bool CollateExpression::Equal(const CollateExpression &a, const CollateExpression &b) {
|
22
|
+
if (!a.child->Equals(*b.child)) {
|
23
23
|
return false;
|
24
24
|
}
|
25
|
-
if (a
|
25
|
+
if (a.collation != b.collation) {
|
26
26
|
return false;
|
27
27
|
}
|
28
28
|
return true;
|
@@ -64,12 +64,12 @@ string ColumnRefExpression::ToString() const {
|
|
64
64
|
return result;
|
65
65
|
}
|
66
66
|
|
67
|
-
bool ColumnRefExpression::Equal(const ColumnRefExpression
|
68
|
-
if (a
|
67
|
+
bool ColumnRefExpression::Equal(const ColumnRefExpression &a, const ColumnRefExpression &b) {
|
68
|
+
if (a.column_names.size() != b.column_names.size()) {
|
69
69
|
return false;
|
70
70
|
}
|
71
|
-
for (idx_t i = 0; i < a
|
72
|
-
if (!StringUtil::CIEquals(a
|
71
|
+
for (idx_t i = 0; i < a.column_names.size(); i++) {
|
72
|
+
if (!StringUtil::CIEquals(a.column_names[i], b.column_names[i])) {
|
73
73
|
return false;
|
74
74
|
}
|
75
75
|
}
|
@@ -18,11 +18,11 @@ string ComparisonExpression::ToString() const {
|
|
18
18
|
return ToString<ComparisonExpression, ParsedExpression>(*this);
|
19
19
|
}
|
20
20
|
|
21
|
-
bool ComparisonExpression::Equal(const ComparisonExpression
|
22
|
-
if (!a
|
21
|
+
bool ComparisonExpression::Equal(const ComparisonExpression &a, const ComparisonExpression &b) {
|
22
|
+
if (!a.left->Equals(*b.left)) {
|
23
23
|
return false;
|
24
24
|
}
|
25
|
-
if (!a
|
25
|
+
if (!a.right->Equals(*b.right)) {
|
26
26
|
return false;
|
27
27
|
}
|
28
28
|
return true;
|
@@ -42,8 +42,8 @@ string ConjunctionExpression::ToString() const {
|
|
42
42
|
return ToString<ConjunctionExpression, ParsedExpression>(*this);
|
43
43
|
}
|
44
44
|
|
45
|
-
bool ConjunctionExpression::Equal(const ConjunctionExpression
|
46
|
-
return ExpressionUtil::SetEquals(a
|
45
|
+
bool ConjunctionExpression::Equal(const ConjunctionExpression &a, const ConjunctionExpression &b) {
|
46
|
+
return ExpressionUtil::SetEquals(a.children, b.children);
|
47
47
|
}
|
48
48
|
|
49
49
|
unique_ptr<ParsedExpression> ConjunctionExpression::Copy() const {
|
@@ -18,8 +18,8 @@ string ConstantExpression::ToString() const {
|
|
18
18
|
return value.ToSQLString();
|
19
19
|
}
|
20
20
|
|
21
|
-
bool ConstantExpression::Equal(const ConstantExpression
|
22
|
-
return a
|
21
|
+
bool ConstantExpression::Equal(const ConstantExpression &a, const ConstantExpression &b) {
|
22
|
+
return a.value.type() == b.value.type() && !ValueOperations::DistinctFrom(a.value, b.value);
|
23
23
|
}
|
24
24
|
|
25
25
|
hash_t ConstantExpression::Hash() const {
|
@@ -37,26 +37,26 @@ string FunctionExpression::ToString() const {
|
|
37
37
|
filter.get(), order_bys.get(), export_state, true);
|
38
38
|
}
|
39
39
|
|
40
|
-
bool FunctionExpression::Equal(const FunctionExpression
|
41
|
-
if (a
|
42
|
-
b
|
40
|
+
bool FunctionExpression::Equal(const FunctionExpression &a, const FunctionExpression &b) {
|
41
|
+
if (a.catalog != b.catalog || a.schema != b.schema || a.function_name != b.function_name ||
|
42
|
+
b.distinct != a.distinct) {
|
43
43
|
return false;
|
44
44
|
}
|
45
|
-
if (b
|
45
|
+
if (b.children.size() != a.children.size()) {
|
46
46
|
return false;
|
47
47
|
}
|
48
|
-
for (idx_t i = 0; i < a
|
49
|
-
if (!a
|
48
|
+
for (idx_t i = 0; i < a.children.size(); i++) {
|
49
|
+
if (!a.children[i]->Equals(*b.children[i])) {
|
50
50
|
return false;
|
51
51
|
}
|
52
52
|
}
|
53
|
-
if (!
|
53
|
+
if (!ParsedExpression::Equals(a.filter, b.filter)) {
|
54
54
|
return false;
|
55
55
|
}
|
56
|
-
if (!a
|
56
|
+
if (!OrderModifier::Equals(a.order_bys, b.order_bys)) {
|
57
57
|
return false;
|
58
58
|
}
|
59
|
-
if (a
|
59
|
+
if (a.export_state != b.export_state) {
|
60
60
|
return false;
|
61
61
|
}
|
62
62
|
return true;
|
@@ -81,11 +81,7 @@ unique_ptr<ParsedExpression> FunctionExpression::Copy() const {
|
|
81
81
|
if (filter) {
|
82
82
|
filter_copy = filter->Copy();
|
83
83
|
}
|
84
|
-
|
85
|
-
if (order_bys) {
|
86
|
-
order_copy.reset(static_cast<OrderModifier *>(order_bys->Copy().release()));
|
87
|
-
}
|
88
|
-
|
84
|
+
auto order_copy = order_bys ? unique_ptr_cast<ResultModifier, OrderModifier>(order_bys->Copy()) : nullptr;
|
89
85
|
auto copy =
|
90
86
|
make_uniq<FunctionExpression>(catalog, schema, function_name, std::move(copy_children), std::move(filter_copy),
|
91
87
|
std::move(order_copy), distinct, is_operator, export_state);
|
@@ -16,8 +16,8 @@ string LambdaExpression::ToString() const {
|
|
16
16
|
return lhs->ToString() + " -> " + expr->ToString();
|
17
17
|
}
|
18
18
|
|
19
|
-
bool LambdaExpression::Equal(const LambdaExpression
|
20
|
-
return a
|
19
|
+
bool LambdaExpression::Equal(const LambdaExpression &a, const LambdaExpression &b) {
|
20
|
+
return a.lhs->Equals(*b.lhs) && a.expr->Equals(*b.expr);
|
21
21
|
}
|
22
22
|
|
23
23
|
hash_t LambdaExpression::Hash() const {
|
@@ -27,12 +27,12 @@ string OperatorExpression::ToString() const {
|
|
27
27
|
return ToString<OperatorExpression, ParsedExpression>(*this);
|
28
28
|
}
|
29
29
|
|
30
|
-
bool OperatorExpression::Equal(const OperatorExpression
|
31
|
-
if (a
|
30
|
+
bool OperatorExpression::Equal(const OperatorExpression &a, const OperatorExpression &b) {
|
31
|
+
if (a.children.size() != b.children.size()) {
|
32
32
|
return false;
|
33
33
|
}
|
34
|
-
for (idx_t i = 0; i < a
|
35
|
-
if (!a
|
34
|
+
for (idx_t i = 0; i < a.children.size(); i++) {
|
35
|
+
if (!a.children[i]->Equals(*b.children[i])) {
|
36
36
|
return false;
|
37
37
|
}
|
38
38
|
}
|
@@ -25,8 +25,8 @@ unique_ptr<ParsedExpression> ParameterExpression::Copy() const {
|
|
25
25
|
return std::move(copy);
|
26
26
|
}
|
27
27
|
|
28
|
-
bool ParameterExpression::Equal(const ParameterExpression
|
29
|
-
return a
|
28
|
+
bool ParameterExpression::Equal(const ParameterExpression &a, const ParameterExpression &b) {
|
29
|
+
return a.parameter_nr == b.parameter_nr;
|
30
30
|
}
|
31
31
|
|
32
32
|
hash_t ParameterExpression::Hash() const {
|
@@ -18,9 +18,9 @@ string PositionalReferenceExpression::ToString() const {
|
|
18
18
|
return "#" + to_string(index);
|
19
19
|
}
|
20
20
|
|
21
|
-
bool PositionalReferenceExpression::Equal(const PositionalReferenceExpression
|
22
|
-
const PositionalReferenceExpression
|
23
|
-
return a
|
21
|
+
bool PositionalReferenceExpression::Equal(const PositionalReferenceExpression &a,
|
22
|
+
const PositionalReferenceExpression &b) {
|
23
|
+
return a.index == b.index;
|
24
24
|
}
|
25
25
|
|
26
26
|
unique_ptr<ParsedExpression> PositionalReferenceExpression::Copy() const {
|
@@ -54,26 +54,26 @@ string StarExpression::ToString() const {
|
|
54
54
|
return result;
|
55
55
|
}
|
56
56
|
|
57
|
-
bool StarExpression::Equal(const StarExpression
|
58
|
-
if (a
|
57
|
+
bool StarExpression::Equal(const StarExpression &a, const StarExpression &b) {
|
58
|
+
if (a.relation_name != b.relation_name || a.exclude_list != b.exclude_list) {
|
59
59
|
return false;
|
60
60
|
}
|
61
|
-
if (a
|
61
|
+
if (a.columns != b.columns) {
|
62
62
|
return false;
|
63
63
|
}
|
64
|
-
if (a
|
64
|
+
if (a.replace_list.size() != b.replace_list.size()) {
|
65
65
|
return false;
|
66
66
|
}
|
67
|
-
for (auto &entry : a
|
68
|
-
auto other_entry = b
|
69
|
-
if (other_entry == b
|
67
|
+
for (auto &entry : a.replace_list) {
|
68
|
+
auto other_entry = b.replace_list.find(entry.first);
|
69
|
+
if (other_entry == b.replace_list.end()) {
|
70
70
|
return false;
|
71
71
|
}
|
72
|
-
if (!entry.second->Equals(other_entry->second
|
72
|
+
if (!entry.second->Equals(*other_entry->second)) {
|
73
73
|
return false;
|
74
74
|
}
|
75
75
|
}
|
76
|
-
if (!
|
76
|
+
if (!ParsedExpression::Equals(a.expr, b.expr)) {
|
77
77
|
return false;
|
78
78
|
}
|
79
79
|
return true;
|
@@ -28,15 +28,15 @@ string SubqueryExpression::ToString() const {
|
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
31
|
-
bool SubqueryExpression::Equal(const SubqueryExpression
|
32
|
-
if (!a
|
31
|
+
bool SubqueryExpression::Equal(const SubqueryExpression &a, const SubqueryExpression &b) {
|
32
|
+
if (!a.subquery || !b.subquery) {
|
33
33
|
return false;
|
34
34
|
}
|
35
|
-
if (!
|
35
|
+
if (!ParsedExpression::Equals(a.child, b.child)) {
|
36
36
|
return false;
|
37
37
|
}
|
38
|
-
return a
|
39
|
-
a
|
38
|
+
return a.comparison_type == b.comparison_type && a.subquery_type == b.subquery_type &&
|
39
|
+
a.subquery->Equals(*b.subquery);
|
40
40
|
}
|
41
41
|
|
42
42
|
unique_ptr<ParsedExpression> SubqueryExpression::Copy() const {
|
@@ -63,53 +63,42 @@ string WindowExpression::ToString() const {
|
|
63
63
|
return ToString<WindowExpression, ParsedExpression, OrderByNode>(*this, schema, function_name);
|
64
64
|
}
|
65
65
|
|
66
|
-
bool WindowExpression::Equal(const WindowExpression
|
66
|
+
bool WindowExpression::Equal(const WindowExpression &a, const WindowExpression &b) {
|
67
67
|
// check if the child expressions are equivalent
|
68
|
-
if (
|
68
|
+
if (a.ignore_nulls != b.ignore_nulls) {
|
69
69
|
return false;
|
70
70
|
}
|
71
|
-
if (a
|
71
|
+
if (!ParsedExpression::ListEquals(a.children, b.children)) {
|
72
72
|
return false;
|
73
73
|
}
|
74
|
-
|
75
|
-
if (!a->children[i]->Equals(b->children[i].get())) {
|
76
|
-
return false;
|
77
|
-
}
|
78
|
-
}
|
79
|
-
if (a->start != b->start || a->end != b->end) {
|
74
|
+
if (a.start != b.start || a.end != b.end) {
|
80
75
|
return false;
|
81
76
|
}
|
82
77
|
// check if the framing expressions are equivalentbind_
|
83
|
-
if (!
|
84
|
-
!
|
85
|
-
!
|
86
|
-
!BaseExpression::Equals(a->default_expr.get(), b->default_expr.get())) {
|
78
|
+
if (!ParsedExpression::Equals(a.start_expr, b.start_expr) || !ParsedExpression::Equals(a.end_expr, b.end_expr) ||
|
79
|
+
!ParsedExpression::Equals(a.offset_expr, b.offset_expr) ||
|
80
|
+
!ParsedExpression::Equals(a.default_expr, b.default_expr)) {
|
87
81
|
return false;
|
88
82
|
}
|
89
83
|
|
90
84
|
// check if the partitions are equivalent
|
91
|
-
if (a
|
85
|
+
if (!ParsedExpression::ListEquals(a.partitions, b.partitions)) {
|
92
86
|
return false;
|
93
87
|
}
|
94
|
-
for (idx_t i = 0; i < a->partitions.size(); i++) {
|
95
|
-
if (!a->partitions[i]->Equals(b->partitions[i].get())) {
|
96
|
-
return false;
|
97
|
-
}
|
98
|
-
}
|
99
88
|
// check if the orderings are equivalent
|
100
|
-
if (a
|
89
|
+
if (a.orders.size() != b.orders.size()) {
|
101
90
|
return false;
|
102
91
|
}
|
103
|
-
for (idx_t i = 0; i < a
|
104
|
-
if (a
|
92
|
+
for (idx_t i = 0; i < a.orders.size(); i++) {
|
93
|
+
if (a.orders[i].type != b.orders[i].type) {
|
105
94
|
return false;
|
106
95
|
}
|
107
|
-
if (!a
|
96
|
+
if (!a.orders[i].expression->Equals(*b.orders[i].expression)) {
|
108
97
|
return false;
|
109
98
|
}
|
110
99
|
}
|
111
100
|
// check if the filter clauses are equivalent
|
112
|
-
if (!
|
101
|
+
if (!ParsedExpression::Equals(a.filter_expr, b.filter_expr)) {
|
113
102
|
return false;
|
114
103
|
}
|
115
104
|
|
@@ -5,7 +5,6 @@
|
|
5
5
|
#include "duckdb/parser/parsed_data/create_table_info.hpp"
|
6
6
|
#include "duckdb/parser/parsed_data/create_view_info.hpp"
|
7
7
|
#include "duckdb/parser/parsed_data/create_sequence_info.hpp"
|
8
|
-
#include "duckdb/parser/parsed_data/create_database_info.hpp"
|
9
8
|
#include "duckdb/parser/parsed_data/create_type_info.hpp"
|
10
9
|
#include "duckdb/parser/parsed_data/alter_info.hpp"
|
11
10
|
#include "duckdb/parser/parsed_data/create_macro_info.hpp"
|
@@ -43,8 +42,6 @@ unique_ptr<CreateInfo> CreateInfo::Deserialize(Deserializer &deserializer) {
|
|
43
42
|
return CreateSchemaInfo::Deserialize(deserializer);
|
44
43
|
case CatalogType::VIEW_ENTRY:
|
45
44
|
return CreateViewInfo::Deserialize(deserializer);
|
46
|
-
case CatalogType::DATABASE_ENTRY:
|
47
|
-
return CreateDatabaseInfo::Deserialize(deserializer);
|
48
45
|
case CatalogType::TYPE_ENTRY:
|
49
46
|
return CreateTypeInfo::Deserialize(deserializer);
|
50
47
|
case CatalogType::MACRO_ENTRY:
|