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
@@ -33,12 +33,12 @@ unique_ptr<AnalyzeState> UncompressedStringStorage::StringInitAnalyze(ColumnData
|
|
33
33
|
}
|
34
34
|
|
35
35
|
bool UncompressedStringStorage::StringAnalyze(AnalyzeState &state_p, Vector &input, idx_t count) {
|
36
|
-
auto &state = (
|
36
|
+
auto &state = state_p.Cast<StringAnalyzeState>();
|
37
37
|
UnifiedVectorFormat vdata;
|
38
38
|
input.ToUnifiedFormat(count, vdata);
|
39
39
|
|
40
40
|
state.count += count;
|
41
|
-
auto data = (
|
41
|
+
auto data = UnifiedVectorFormat::GetData<string_t>(vdata);
|
42
42
|
for (idx_t i = 0; i < count; i++) {
|
43
43
|
auto idx = vdata.sel->get_index(i);
|
44
44
|
if (vdata.validity.RowIsValid(idx)) {
|
@@ -53,7 +53,7 @@ bool UncompressedStringStorage::StringAnalyze(AnalyzeState &state_p, Vector &inp
|
|
53
53
|
}
|
54
54
|
|
55
55
|
idx_t UncompressedStringStorage::StringFinalAnalyze(AnalyzeState &state_p) {
|
56
|
-
auto &state = (
|
56
|
+
auto &state = state_p.Cast<StringAnalyzeState>();
|
57
57
|
return state.count * sizeof(int32_t) + state.total_string_size + state.overflow_strings * BIG_STRING_MARKER_SIZE;
|
58
58
|
}
|
59
59
|
|
@@ -73,12 +73,12 @@ unique_ptr<SegmentScanState> UncompressedStringStorage::StringInitScan(ColumnSeg
|
|
73
73
|
void UncompressedStringStorage::StringScanPartial(ColumnSegment &segment, ColumnScanState &state, idx_t scan_count,
|
74
74
|
Vector &result, idx_t result_offset) {
|
75
75
|
// clear any previously locked buffers and get the primary buffer handle
|
76
|
-
auto &scan_state =
|
76
|
+
auto &scan_state = state.scan_state->Cast<StringScanState>();
|
77
77
|
auto start = segment.GetRelativeIndex(state.row_index);
|
78
78
|
|
79
79
|
auto baseptr = scan_state.handle.Ptr() + segment.GetBlockOffset();
|
80
80
|
auto dict = GetDictionary(segment, scan_state.handle);
|
81
|
-
auto base_data =
|
81
|
+
auto base_data = reinterpret_cast<int32_t *>(baseptr + DICTIONARY_HEADER_SIZE);
|
82
82
|
auto result_data = FlatVector::GetData<string_t>(result);
|
83
83
|
|
84
84
|
int32_t previous_offset = start > 0 ? base_data[start - 1] : 0;
|
@@ -124,7 +124,7 @@ void UncompressedStringStorage::StringFetchRow(ColumnSegment &segment, ColumnFet
|
|
124
124
|
|
125
125
|
auto baseptr = handle.Ptr() + segment.GetBlockOffset();
|
126
126
|
auto dict = GetDictionary(segment, handle);
|
127
|
-
auto base_data =
|
127
|
+
auto base_data = reinterpret_cast<int32_t *>(baseptr + DICTIONARY_HEADER_SIZE);
|
128
128
|
auto result_data = FlatVector::GetData<string_t>(result);
|
129
129
|
|
130
130
|
auto dict_offset = base_data[row_id];
|
@@ -223,7 +223,7 @@ idx_t UncompressedStringStorage::RemainingSpace(ColumnSegment &segment, BufferHa
|
|
223
223
|
|
224
224
|
void UncompressedStringStorage::WriteString(ColumnSegment &segment, string_t string, block_id_t &result_block,
|
225
225
|
int32_t &result_offset) {
|
226
|
-
auto &state =
|
226
|
+
auto &state = segment.GetSegmentState()->Cast<UncompressedStringSegmentState>();
|
227
227
|
if (state.overflow_writer) {
|
228
228
|
// overflow writer is set: write string there
|
229
229
|
state.overflow_writer->WriteString(string, result_block, result_offset);
|
@@ -240,7 +240,7 @@ void UncompressedStringStorage::WriteStringMemory(ColumnSegment &segment, string
|
|
240
240
|
BufferHandle handle;
|
241
241
|
|
242
242
|
auto &buffer_manager = BufferManager::GetBufferManager(segment.db);
|
243
|
-
auto &state =
|
243
|
+
auto &state = segment.GetSegmentState()->Cast<UncompressedStringSegmentState>();
|
244
244
|
// check if the string fits in the current block
|
245
245
|
if (!state.head || state.head->offset + total_length >= state.head->size) {
|
246
246
|
// string does not fit, allocate space for it
|
@@ -278,7 +278,7 @@ string_t UncompressedStringStorage::ReadOverflowString(ColumnSegment &segment, V
|
|
278
278
|
|
279
279
|
auto &block_manager = segment.GetBlockManager();
|
280
280
|
auto &buffer_manager = block_manager.buffer_manager;
|
281
|
-
auto &state =
|
281
|
+
auto &state = segment.GetSegmentState()->Cast<UncompressedStringSegmentState>();
|
282
282
|
if (block < MAXIMUM_BLOCK) {
|
283
283
|
// read the overflow string from disk
|
284
284
|
// pin the initial handle and read the length
|
@@ -325,7 +325,7 @@ string_t UncompressedStringStorage::ReadOverflowString(ColumnSegment &segment, V
|
|
325
325
|
buffer_manager.Allocate(MaxValue<idx_t>(Storage::BLOCK_SIZE, uncompressed_size));
|
326
326
|
auto decompressed_target_ptr = decompressed_target_handle.Ptr();
|
327
327
|
MiniZStream s;
|
328
|
-
s.Decompress((
|
328
|
+
s.Decompress(const_char_ptr_cast(decompression_ptr), compressed_size, char_ptr_cast(decompressed_target_ptr),
|
329
329
|
uncompressed_size);
|
330
330
|
|
331
331
|
auto final_buffer = decompressed_target_handle.Ptr();
|
@@ -345,14 +345,14 @@ string_t UncompressedStringStorage::ReadOverflowString(ColumnSegment &segment, V
|
|
345
345
|
|
346
346
|
string_t UncompressedStringStorage::ReadString(data_ptr_t target, int32_t offset, uint32_t string_length) {
|
347
347
|
auto ptr = target + offset;
|
348
|
-
auto str_ptr = (
|
348
|
+
auto str_ptr = char_ptr_cast(ptr);
|
349
349
|
return string_t(str_ptr, string_length);
|
350
350
|
}
|
351
351
|
|
352
352
|
string_t UncompressedStringStorage::ReadStringWithLength(data_ptr_t target, int32_t offset) {
|
353
353
|
auto ptr = target + offset;
|
354
354
|
auto str_length = Load<uint32_t>(ptr);
|
355
|
-
auto str_ptr = (
|
355
|
+
auto str_ptr = char_ptr_cast(ptr + sizeof(uint32_t));
|
356
356
|
return string_t(str_ptr, str_length);
|
357
357
|
}
|
358
358
|
|
@@ -403,7 +403,7 @@ string_t UncompressedStringStorage::FetchString(ColumnSegment &segment, StringDi
|
|
403
403
|
auto dict_end = baseptr + dict.end;
|
404
404
|
auto dict_pos = dict_end - location.offset;
|
405
405
|
|
406
|
-
auto str_ptr = (
|
406
|
+
auto str_ptr = char_ptr_cast(dict_pos);
|
407
407
|
return string_t(str_ptr, string_length);
|
408
408
|
}
|
409
409
|
}
|
@@ -188,13 +188,13 @@ unique_ptr<AnalyzeState> ValidityInitAnalyze(ColumnData &col_data, PhysicalType
|
|
188
188
|
}
|
189
189
|
|
190
190
|
bool ValidityAnalyze(AnalyzeState &state_p, Vector &input, idx_t count) {
|
191
|
-
auto &state = (
|
191
|
+
auto &state = state_p.Cast<ValidityAnalyzeState>();
|
192
192
|
state.count += count;
|
193
193
|
return true;
|
194
194
|
}
|
195
195
|
|
196
196
|
idx_t ValidityFinalAnalyze(AnalyzeState &state_p) {
|
197
|
-
auto &state = (
|
197
|
+
auto &state = state_p.Cast<ValidityAnalyzeState>();
|
198
198
|
return (state.count + 7) / 8;
|
199
199
|
}
|
200
200
|
|
@@ -222,12 +222,12 @@ void ValidityScanPartial(ColumnSegment &segment, ColumnScanState &state, idx_t s
|
|
222
222
|
auto start = segment.GetRelativeIndex(state.row_index);
|
223
223
|
|
224
224
|
static_assert(sizeof(validity_t) == sizeof(uint64_t), "validity_t should be 64-bit");
|
225
|
-
auto &scan_state =
|
225
|
+
auto &scan_state = state.scan_state->Cast<ValidityScanState>();
|
226
226
|
|
227
227
|
auto &result_mask = FlatVector::Validity(result);
|
228
228
|
auto buffer_ptr = scan_state.handle.Ptr() + segment.GetBlockOffset();
|
229
229
|
D_ASSERT(scan_state.block_id == segment.block->BlockId());
|
230
|
-
auto input_data =
|
230
|
+
auto input_data = reinterpret_cast<validity_t *>(buffer_ptr);
|
231
231
|
|
232
232
|
#ifdef DEBUG
|
233
233
|
// this method relies on all the bits we are going to write to being set to valid
|
@@ -345,7 +345,7 @@ void ValidityScan(ColumnSegment &segment, ColumnScanState &state, idx_t scan_cou
|
|
345
345
|
|
346
346
|
auto start = segment.GetRelativeIndex(state.row_index);
|
347
347
|
if (start % ValidityMask::BITS_PER_VALUE == 0) {
|
348
|
-
auto &scan_state =
|
348
|
+
auto &scan_state = state.scan_state->Cast<ValidityScanState>();
|
349
349
|
|
350
350
|
// aligned scan: no need to do anything fancy
|
351
351
|
// note: this is only an optimization which avoids having to do messy bitshifting in the common case
|
@@ -353,8 +353,8 @@ void ValidityScan(ColumnSegment &segment, ColumnScanState &state, idx_t scan_cou
|
|
353
353
|
auto &result_mask = FlatVector::Validity(result);
|
354
354
|
auto buffer_ptr = scan_state.handle.Ptr() + segment.GetBlockOffset();
|
355
355
|
D_ASSERT(scan_state.block_id == segment.block->BlockId());
|
356
|
-
auto input_data =
|
357
|
-
auto result_data =
|
356
|
+
auto input_data = reinterpret_cast<validity_t *>(buffer_ptr);
|
357
|
+
auto result_data = result_mask.GetData();
|
358
358
|
idx_t start_offset = start / ValidityMask::BITS_PER_VALUE;
|
359
359
|
idx_t entry_scan_count = (scan_count + ValidityMask::BITS_PER_VALUE - 1) / ValidityMask::BITS_PER_VALUE;
|
360
360
|
for (idx_t i = 0; i < entry_scan_count; i++) {
|
@@ -364,7 +364,7 @@ void ValidityScan(ColumnSegment &segment, ColumnScanState &state, idx_t scan_cou
|
|
364
364
|
}
|
365
365
|
if (!result_data) {
|
366
366
|
result_mask.Initialize(MaxValue<idx_t>(STANDARD_VECTOR_SIZE, scan_count));
|
367
|
-
result_data =
|
367
|
+
result_data = result_mask.GetData();
|
368
368
|
}
|
369
369
|
result_data[i] = input_entry;
|
370
370
|
}
|
@@ -382,7 +382,7 @@ void ValidityFetchRow(ColumnSegment &segment, ColumnFetchState &state, row_t row
|
|
382
382
|
auto &buffer_manager = BufferManager::GetBufferManager(segment.db);
|
383
383
|
auto handle = buffer_manager.Pin(segment.block);
|
384
384
|
auto dataptr = handle.Ptr() + segment.GetBlockOffset();
|
385
|
-
ValidityMask mask(
|
385
|
+
ValidityMask mask(reinterpret_cast<validity_t *>(dataptr));
|
386
386
|
auto &result_mask = FlatVector::Validity(result);
|
387
387
|
if (!mask.RowIsValidUnsafe(row_id)) {
|
388
388
|
result_mask.SetInvalid(result_idx);
|
@@ -421,7 +421,7 @@ idx_t ValidityAppend(CompressionAppendState &append_state, ColumnSegment &segmen
|
|
421
421
|
return append_count;
|
422
422
|
}
|
423
423
|
|
424
|
-
ValidityMask mask(
|
424
|
+
ValidityMask mask(reinterpret_cast<validity_t *>(append_state.handle.Ptr()));
|
425
425
|
for (idx_t i = 0; i < append_count; i++) {
|
426
426
|
auto idx = data.sel->get_index(offset + i);
|
427
427
|
if (!data.validity.RowIsValidUnsafe(idx)) {
|
@@ -450,7 +450,7 @@ void ValidityRevertAppend(ColumnSegment &segment, idx_t start_row) {
|
|
450
450
|
idx_t byte_pos = start_bit / 8;
|
451
451
|
idx_t bit_start = byte_pos * 8;
|
452
452
|
idx_t bit_end = (byte_pos + 1) * 8;
|
453
|
-
ValidityMask mask(
|
453
|
+
ValidityMask mask(reinterpret_cast<validity_t *>(handle.Ptr() + byte_pos));
|
454
454
|
for (idx_t i = start_bit; i < bit_end; i++) {
|
455
455
|
mask.SetValid(i - bit_start);
|
456
456
|
}
|
@@ -13,6 +13,7 @@
|
|
13
13
|
#include "duckdb/planner/table_filter.hpp"
|
14
14
|
#include "duckdb/storage/checkpoint/table_data_writer.hpp"
|
15
15
|
#include "duckdb/storage/storage_manager.hpp"
|
16
|
+
#include "duckdb/storage/table_storage_info.hpp"
|
16
17
|
#include "duckdb/storage/table/persistent_table_data.hpp"
|
17
18
|
#include "duckdb/storage/table/row_group.hpp"
|
18
19
|
#include "duckdb/storage/table/standard_column_data.hpp"
|
@@ -302,7 +303,7 @@ static void VerifyCheckConstraint(ClientContext &context, TableCatalogEntry &tab
|
|
302
303
|
UnifiedVectorFormat vdata;
|
303
304
|
result.ToUnifiedFormat(chunk.size(), vdata);
|
304
305
|
|
305
|
-
auto dataptr = (
|
306
|
+
auto dataptr = UnifiedVectorFormat::GetData<int32_t>(vdata);
|
306
307
|
for (idx_t i = 0; i < chunk.size(); i++) {
|
307
308
|
auto idx = vdata.sel->get_index(i);
|
308
309
|
if (vdata.validity.RowIsValid(idx) && dataptr[idx] == 0) {
|
@@ -834,7 +835,7 @@ void DataTable::RevertAppend(idx_t start_row, idx_t count) {
|
|
834
835
|
if (!info->indexes.Empty()) {
|
835
836
|
idx_t current_row_base = start_row;
|
836
837
|
row_t row_data[STANDARD_VECTOR_SIZE];
|
837
|
-
Vector row_identifiers(LogicalType::ROW_TYPE, (
|
838
|
+
Vector row_identifiers(LogicalType::ROW_TYPE, data_ptr_cast(row_data));
|
838
839
|
ScanTableSegment(start_row, count, [&](DataChunk &chunk) {
|
839
840
|
for (idx_t i = 0; i < chunk.size(); i++) {
|
840
841
|
row_data[i] = current_row_base + i;
|
@@ -1201,13 +1202,14 @@ void DataTable::WALAddIndex(ClientContext &context, unique_ptr<Index> index,
|
|
1201
1202
|
// intermediate holds scanned chunks of the underlying data to create the index
|
1202
1203
|
DataChunk intermediate;
|
1203
1204
|
vector<LogicalType> intermediate_types;
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
intermediate_types.push_back(col.Type());
|
1205
|
+
vector<column_t> column_ids;
|
1206
|
+
for (auto &it : column_definitions) {
|
1207
|
+
intermediate_types.push_back(it.Type());
|
1208
|
+
column_ids.push_back(it.Oid());
|
1209
1209
|
}
|
1210
|
+
column_ids.push_back(COLUMN_IDENTIFIER_ROW_ID);
|
1210
1211
|
intermediate_types.emplace_back(LogicalType::ROW_TYPE);
|
1212
|
+
|
1211
1213
|
intermediate.Initialize(allocator, intermediate_types);
|
1212
1214
|
|
1213
1215
|
// holds the result of executing the index expression on the intermediate chunks
|
@@ -1299,10 +1301,10 @@ void DataTable::CommitDropTable() {
|
|
1299
1301
|
}
|
1300
1302
|
|
1301
1303
|
//===--------------------------------------------------------------------===//
|
1302
|
-
//
|
1304
|
+
// GetColumnSegmentInfo
|
1303
1305
|
//===--------------------------------------------------------------------===//
|
1304
|
-
|
1305
|
-
row_groups->
|
1306
|
+
vector<ColumnSegmentInfo> DataTable::GetColumnSegmentInfo() {
|
1307
|
+
return row_groups->GetColumnSegmentInfo();
|
1306
1308
|
}
|
1307
1309
|
|
1308
1310
|
} // namespace duckdb
|
@@ -59,6 +59,19 @@ bool Index::MergeIndexes(Index &other_index) {
|
|
59
59
|
}
|
60
60
|
}
|
61
61
|
|
62
|
+
string Index::VerifyAndToString(const bool only_verify) {
|
63
|
+
|
64
|
+
IndexLock state;
|
65
|
+
InitializeLock(state);
|
66
|
+
|
67
|
+
switch (this->type) {
|
68
|
+
case IndexType::ART:
|
69
|
+
return Cast<ART>().VerifyAndToString(state, only_verify);
|
70
|
+
default:
|
71
|
+
throw InternalException("Unimplemented index type for VerifyAndToString");
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
62
75
|
void Index::Vacuum() {
|
63
76
|
|
64
77
|
IndexLock state;
|
@@ -19,7 +19,7 @@ namespace duckdb {
|
|
19
19
|
const char MainHeader::MAGIC_BYTES[] = "DUCK";
|
20
20
|
|
21
21
|
void MainHeader::Serialize(Serializer &ser) {
|
22
|
-
ser.WriteData((
|
22
|
+
ser.WriteData(const_data_ptr_cast(MAGIC_BYTES), MAGIC_BYTE_SIZE);
|
23
23
|
ser.Write<uint64_t>(version_number);
|
24
24
|
FieldWriter writer(ser);
|
25
25
|
for (idx_t i = 0; i < FLAG_COUNT; i++) {
|
@@ -170,7 +170,7 @@ void SingleFileBlockManager::CreateNewDatabase() {
|
|
170
170
|
h2.free_list = INVALID_BLOCK;
|
171
171
|
h2.block_count = 0;
|
172
172
|
SerializeHeaderStructure<DatabaseHeader>(h2, header_buffer.buffer);
|
173
|
-
ChecksumAndWrite(header_buffer, Storage::FILE_HEADER_SIZE *
|
173
|
+
ChecksumAndWrite(header_buffer, Storage::FILE_HEADER_SIZE * 2ULL);
|
174
174
|
// ensure that writing to disk is completed before returning
|
175
175
|
handle->Sync();
|
176
176
|
// we start with h2 as active_header, this way our initial write will be in h1
|
@@ -197,7 +197,7 @@ void SingleFileBlockManager::LoadExistingDatabase() {
|
|
197
197
|
DatabaseHeader h1, h2;
|
198
198
|
ReadAndChecksum(header_buffer, Storage::FILE_HEADER_SIZE);
|
199
199
|
h1 = DeserializeHeaderStructure<DatabaseHeader>(header_buffer.buffer);
|
200
|
-
ReadAndChecksum(header_buffer, Storage::FILE_HEADER_SIZE *
|
200
|
+
ReadAndChecksum(header_buffer, Storage::FILE_HEADER_SIZE * 2ULL);
|
201
201
|
h2 = DeserializeHeaderStructure<DatabaseHeader>(header_buffer.buffer);
|
202
202
|
// check the header with the highest iteration count
|
203
203
|
if (h1.iteration > h2.iteration) {
|
@@ -751,7 +751,7 @@ void StandardBufferManager::FreeReservedMemory(idx_t size) {
|
|
751
751
|
// Buffer Allocator
|
752
752
|
//===--------------------------------------------------------------------===//
|
753
753
|
data_ptr_t StandardBufferManager::BufferAllocatorAllocate(PrivateAllocatorData *private_data, idx_t size) {
|
754
|
-
auto &data = (
|
754
|
+
auto &data = private_data->Cast<BufferAllocatorData>();
|
755
755
|
auto reservation = data.manager.EvictBlocksOrThrow(size, nullptr, "failed to allocate data of size %s%s",
|
756
756
|
StringUtil::BytesToHumanReadableString(size));
|
757
757
|
// We rely on manual tracking of this one. :(
|
@@ -760,7 +760,7 @@ data_ptr_t StandardBufferManager::BufferAllocatorAllocate(PrivateAllocatorData *
|
|
760
760
|
}
|
761
761
|
|
762
762
|
void StandardBufferManager::BufferAllocatorFree(PrivateAllocatorData *private_data, data_ptr_t pointer, idx_t size) {
|
763
|
-
auto &data = (
|
763
|
+
auto &data = private_data->Cast<BufferAllocatorData>();
|
764
764
|
BufferPoolReservation r(data.manager.GetBufferPool());
|
765
765
|
r.size = size;
|
766
766
|
r.Resize(0);
|
@@ -772,7 +772,7 @@ data_ptr_t StandardBufferManager::BufferAllocatorRealloc(PrivateAllocatorData *p
|
|
772
772
|
if (old_size == size) {
|
773
773
|
return pointer;
|
774
774
|
}
|
775
|
-
auto &data = (
|
775
|
+
auto &data = private_data->Cast<BufferAllocatorData>();
|
776
776
|
BufferPoolReservation r(data.manager.GetBufferPool());
|
777
777
|
r.size = old_size;
|
778
778
|
r.Resize(size);
|
@@ -90,7 +90,7 @@ void ListStats::Verify(const BaseStatistics &stats, Vector &vector, const Select
|
|
90
90
|
UnifiedVectorFormat vdata;
|
91
91
|
vector.ToUnifiedFormat(count, vdata);
|
92
92
|
|
93
|
-
auto list_data = (
|
93
|
+
auto list_data = UnifiedVectorFormat::GetData<list_entry_t>(vdata);
|
94
94
|
idx_t total_list_count = 0;
|
95
95
|
for (idx_t i = 0; i < count; i++) {
|
96
96
|
auto idx = sel.get_index(i);
|
@@ -525,7 +525,7 @@ void NumericStats::TemplatedVerify(const BaseStatistics &stats, Vector &vector,
|
|
525
525
|
UnifiedVectorFormat vdata;
|
526
526
|
vector.ToUnifiedFormat(count, vdata);
|
527
527
|
|
528
|
-
auto data = (
|
528
|
+
auto data = UnifiedVectorFormat::GetData<T>(vdata);
|
529
529
|
auto min_value = NumericStats::MinOrNull(stats);
|
530
530
|
auto max_value = NumericStats::MaxOrNull(stats);
|
531
531
|
for (idx_t i = 0; i < count; i++) {
|
@@ -116,7 +116,7 @@ static void ConstructValue(const_data_ptr_t data, idx_t size, data_t target[]) {
|
|
116
116
|
}
|
117
117
|
|
118
118
|
void StringStats::Update(BaseStatistics &stats, const string_t &value) {
|
119
|
-
auto data = (
|
119
|
+
auto data = const_data_ptr_cast(value.GetData());
|
120
120
|
auto size = value.GetSize();
|
121
121
|
|
122
122
|
//! we can only fit 8 bytes, so we might need to trim our string
|
@@ -136,12 +136,12 @@ void StringStats::Update(BaseStatistics &stats, const string_t &value) {
|
|
136
136
|
string_data.max_string_length = size;
|
137
137
|
}
|
138
138
|
if (stats.GetType().id() == LogicalTypeId::VARCHAR && !string_data.has_unicode) {
|
139
|
-
auto unicode = Utf8Proc::Analyze((
|
139
|
+
auto unicode = Utf8Proc::Analyze(const_char_ptr_cast(data), size);
|
140
140
|
if (unicode == UnicodeType::UNICODE) {
|
141
141
|
string_data.has_unicode = true;
|
142
142
|
} else if (unicode == UnicodeType::INVALID) {
|
143
|
-
throw InvalidInputException(
|
144
|
-
|
143
|
+
throw InvalidInputException(ErrorManager::InvalidUnicodeError(string(const_char_ptr_cast(data), size),
|
144
|
+
"segment statistics update"));
|
145
145
|
}
|
146
146
|
}
|
147
147
|
}
|
@@ -166,7 +166,7 @@ void StringStats::Merge(BaseStatistics &stats, const BaseStatistics &other) {
|
|
166
166
|
FilterPropagateResult StringStats::CheckZonemap(const BaseStatistics &stats, ExpressionType comparison_type,
|
167
167
|
const string &constant) {
|
168
168
|
auto &string_data = StringStats::GetDataUnsafe(stats);
|
169
|
-
auto data = (
|
169
|
+
auto data = const_data_ptr_cast(constant.c_str());
|
170
170
|
auto size = constant.size();
|
171
171
|
|
172
172
|
idx_t value_size = size > StringStatsData::MAX_STRING_MINMAX_SIZE ? StringStatsData::MAX_STRING_MINMAX_SIZE : size;
|
@@ -219,10 +219,11 @@ string StringStats::ToString(const BaseStatistics &stats) {
|
|
219
219
|
auto &string_data = StringStats::GetDataUnsafe(stats);
|
220
220
|
idx_t min_len = GetValidMinMaxSubstring(string_data.min);
|
221
221
|
idx_t max_len = GetValidMinMaxSubstring(string_data.max);
|
222
|
-
return StringUtil::Format(
|
223
|
-
|
224
|
-
|
225
|
-
|
222
|
+
return StringUtil::Format("[Min: %s, Max: %s, Has Unicode: %s, Max String Length: %s]",
|
223
|
+
string(const_char_ptr_cast(string_data.min), min_len),
|
224
|
+
string(const_char_ptr_cast(string_data.max), max_len),
|
225
|
+
string_data.has_unicode ? "true" : "false",
|
226
|
+
string_data.has_max_string_length ? to_string(string_data.max_string_length) : "?");
|
226
227
|
}
|
227
228
|
|
228
229
|
void StringStats::Verify(const BaseStatistics &stats, Vector &vector, const SelectionVector &sel, idx_t count) {
|
@@ -230,7 +231,7 @@ void StringStats::Verify(const BaseStatistics &stats, Vector &vector, const Sele
|
|
230
231
|
|
231
232
|
UnifiedVectorFormat vdata;
|
232
233
|
vector.ToUnifiedFormat(count, vdata);
|
233
|
-
auto data = (
|
234
|
+
auto data = UnifiedVectorFormat::GetData<string_t>(vdata);
|
234
235
|
for (idx_t i = 0; i < count; i++) {
|
235
236
|
auto idx = sel.get_index(i);
|
236
237
|
auto index = vdata.sel->get_index(idx);
|
@@ -256,13 +257,13 @@ void StringStats::Verify(const BaseStatistics &stats, Vector &vector, const Sele
|
|
256
257
|
throw InternalException("Invalid unicode detected in vector: %s", vector.ToString(count));
|
257
258
|
}
|
258
259
|
}
|
259
|
-
if (StringValueComparison((
|
260
|
-
string_data.min) < 0) {
|
260
|
+
if (StringValueComparison(const_data_ptr_cast(data),
|
261
|
+
MinValue<idx_t>(len, StringStatsData::MAX_STRING_MINMAX_SIZE), string_data.min) < 0) {
|
261
262
|
throw InternalException("Statistics mismatch: value is smaller than min.\nStatistics: %s\nVector: %s",
|
262
263
|
stats.ToString(), vector.ToString(count));
|
263
264
|
}
|
264
|
-
if (StringValueComparison((
|
265
|
-
string_data.max) > 0) {
|
265
|
+
if (StringValueComparison(const_data_ptr_cast(data),
|
266
|
+
MinValue<idx_t>(len, StringStatsData::MAX_STRING_MINMAX_SIZE), string_data.max) > 0) {
|
266
267
|
throw InternalException("Statistics mismatch: value is bigger than max.\nStatistics: %s\nVector: %s",
|
267
268
|
stats.ToString(), vector.ToString(count));
|
268
269
|
}
|
@@ -12,6 +12,7 @@
|
|
12
12
|
#include "duckdb/transaction/transaction_manager.hpp"
|
13
13
|
#include "duckdb/common/serializer/buffered_file_reader.hpp"
|
14
14
|
#include "duckdb/main/attached_database.hpp"
|
15
|
+
#include "duckdb/main/database_manager.hpp"
|
15
16
|
|
16
17
|
namespace duckdb {
|
17
18
|
|
@@ -98,6 +99,11 @@ void SingleFileStorageManager::LoadDatabase() {
|
|
98
99
|
auto &fs = FileSystem::Get(db);
|
99
100
|
auto &config = DBConfig::Get(db);
|
100
101
|
bool truncate_wal = false;
|
102
|
+
if (!config.options.enable_external_access) {
|
103
|
+
if (!db.IsInitialDatabase()) {
|
104
|
+
throw PermissionException("Attaching on-disk databases is disabled through configuration");
|
105
|
+
}
|
106
|
+
}
|
101
107
|
|
102
108
|
StorageManagerOptions options;
|
103
109
|
options.read_only = read_only;
|
@@ -241,7 +241,7 @@ void ChunkVectorInfo::Serialize(Serializer &serializer) {
|
|
241
241
|
for (idx_t i = 0; i < count; i++) {
|
242
242
|
deleted_tuples[sel.get_index(i)] = false;
|
243
243
|
}
|
244
|
-
serializer.WriteData((
|
244
|
+
serializer.WriteData(data_ptr_cast(deleted_tuples), sizeof(bool) * STANDARD_VECTOR_SIZE);
|
245
245
|
}
|
246
246
|
|
247
247
|
unique_ptr<ChunkInfo> ChunkVectorInfo::Deserialize(Deserializer &source) {
|
@@ -250,7 +250,7 @@ unique_ptr<ChunkInfo> ChunkVectorInfo::Deserialize(Deserializer &source) {
|
|
250
250
|
auto result = make_uniq<ChunkVectorInfo>(start);
|
251
251
|
result->any_deleted = true;
|
252
252
|
bool deleted_tuples[STANDARD_VECTOR_SIZE];
|
253
|
-
source.ReadData((
|
253
|
+
source.ReadData(data_ptr_cast(deleted_tuples), sizeof(bool) * STANDARD_VECTOR_SIZE);
|
254
254
|
for (idx_t i = 0; i < STANDARD_VECTOR_SIZE; i++) {
|
255
255
|
if (deleted_tuples[i]) {
|
256
256
|
result->deleted[i] = 0;
|
@@ -488,7 +488,8 @@ shared_ptr<ColumnData> ColumnData::Deserialize(BlockManager &block_manager, Data
|
|
488
488
|
return entry;
|
489
489
|
}
|
490
490
|
|
491
|
-
void ColumnData::
|
491
|
+
void ColumnData::GetColumnSegmentInfo(idx_t row_group_index, vector<idx_t> col_path,
|
492
|
+
vector<ColumnSegmentInfo> &result) {
|
492
493
|
D_ASSERT(!col_path.empty());
|
493
494
|
|
494
495
|
// convert the column path to a string
|
@@ -515,7 +516,10 @@ void ColumnData::GetStorageInfo(idx_t row_group_index, vector<idx_t> col_path, T
|
|
515
516
|
column_info.segment_count = segment->count;
|
516
517
|
column_info.compression_type = CompressionTypeToString(segment->function.get().type);
|
517
518
|
column_info.segment_stats = segment->stats.statistics.ToString();
|
518
|
-
|
519
|
+
{
|
520
|
+
lock_guard<mutex> ulock(update_lock);
|
521
|
+
column_info.has_updates = updates ? true : false;
|
522
|
+
}
|
519
523
|
// persistent
|
520
524
|
// block_id
|
521
525
|
// block_offset
|
@@ -526,7 +530,7 @@ void ColumnData::GetStorageInfo(idx_t row_group_index, vector<idx_t> col_path, T
|
|
526
530
|
} else {
|
527
531
|
column_info.persistent = false;
|
528
532
|
}
|
529
|
-
result.
|
533
|
+
result.emplace_back(column_info);
|
530
534
|
|
531
535
|
segment_idx++;
|
532
536
|
segment = (ColumnSegment *)data.GetNextSegment(segment);
|
@@ -331,7 +331,7 @@ idx_t ColumnSegment::FilterSelection(SelectionVector &sel, Vector &result, const
|
|
331
331
|
// similar to the CONJUNCTION_AND, but we need to take care of the SelectionVectors (OR all of them)
|
332
332
|
idx_t count_total = 0;
|
333
333
|
SelectionVector result_sel(approved_tuple_count);
|
334
|
-
auto &conjunction_or = (
|
334
|
+
auto &conjunction_or = filter.Cast<ConjunctionOrFilter>();
|
335
335
|
for (auto &child_filter : conjunction_or.child_filters) {
|
336
336
|
SelectionVector temp_sel;
|
337
337
|
temp_sel.Initialize(sel);
|
@@ -357,14 +357,14 @@ idx_t ColumnSegment::FilterSelection(SelectionVector &sel, Vector &result, const
|
|
357
357
|
return approved_tuple_count;
|
358
358
|
}
|
359
359
|
case TableFilterType::CONJUNCTION_AND: {
|
360
|
-
auto &conjunction_and = (
|
360
|
+
auto &conjunction_and = filter.Cast<ConjunctionAndFilter>();
|
361
361
|
for (auto &child_filter : conjunction_and.child_filters) {
|
362
362
|
FilterSelection(sel, result, *child_filter, approved_tuple_count, mask);
|
363
363
|
}
|
364
364
|
return approved_tuple_count;
|
365
365
|
}
|
366
366
|
case TableFilterType::CONSTANT_COMPARISON: {
|
367
|
-
auto &constant_filter = (
|
367
|
+
auto &constant_filter = filter.Cast<ConstantFilter>();
|
368
368
|
// the inplace loops take the result as the last parameter
|
369
369
|
switch (result.GetType().InternalType()) {
|
370
370
|
case PhysicalType::UINT8: {
|
@@ -167,7 +167,7 @@ void ListColumnData::Append(BaseStatistics &stats, ColumnAppendState &state, Vec
|
|
167
167
|
auto &list_validity = list_data.validity;
|
168
168
|
|
169
169
|
// construct the list_entry_t entries to append to the column data
|
170
|
-
auto input_offsets = (
|
170
|
+
auto input_offsets = UnifiedVectorFormat::GetData<list_entry_t>(list_data);
|
171
171
|
auto start_offset = child_column->GetMaxEntry();
|
172
172
|
idx_t child_count = 0;
|
173
173
|
|
@@ -210,7 +210,7 @@ void ListColumnData::Append(BaseStatistics &stats, ColumnAppendState &state, Vec
|
|
210
210
|
|
211
211
|
UnifiedVectorFormat vdata;
|
212
212
|
vdata.sel = FlatVector::IncrementalSelectionVector();
|
213
|
-
vdata.data = (
|
213
|
+
vdata.data = data_ptr_cast(append_offsets.get());
|
214
214
|
|
215
215
|
// append the list offsets
|
216
216
|
ColumnData::AppendData(stats, state, vdata, count);
|
@@ -337,7 +337,7 @@ unique_ptr<ColumnCheckpointState> ListColumnData::Checkpoint(RowGroup &row_group
|
|
337
337
|
auto base_state = ColumnData::Checkpoint(row_group, partial_block_manager, checkpoint_info);
|
338
338
|
auto child_state = child_column->Checkpoint(row_group, partial_block_manager, checkpoint_info);
|
339
339
|
|
340
|
-
auto &checkpoint_state = (
|
340
|
+
auto &checkpoint_state = base_state->Cast<ListColumnCheckpointState>();
|
341
341
|
checkpoint_state.validity_state = std::move(validity_state);
|
342
342
|
checkpoint_state.child_state = std::move(child_state);
|
343
343
|
return base_state;
|
@@ -349,12 +349,13 @@ void ListColumnData::DeserializeColumn(Deserializer &source) {
|
|
349
349
|
child_column->DeserializeColumn(source);
|
350
350
|
}
|
351
351
|
|
352
|
-
void ListColumnData::
|
353
|
-
|
352
|
+
void ListColumnData::GetColumnSegmentInfo(duckdb::idx_t row_group_index, vector<duckdb::idx_t> col_path,
|
353
|
+
vector<duckdb::ColumnSegmentInfo> &result) {
|
354
|
+
ColumnData::GetColumnSegmentInfo(row_group_index, col_path, result);
|
354
355
|
col_path.push_back(0);
|
355
|
-
validity.
|
356
|
+
validity.GetColumnSegmentInfo(row_group_index, col_path, result);
|
356
357
|
col_path.back() = 1;
|
357
|
-
child_column->
|
358
|
+
child_column->GetColumnSegmentInfo(row_group_index, col_path, result);
|
358
359
|
}
|
359
360
|
|
360
361
|
} // namespace duckdb
|
@@ -6,6 +6,7 @@
|
|
6
6
|
#include "duckdb/storage/table/column_data.hpp"
|
7
7
|
#include "duckdb/storage/table/column_checkpoint_state.hpp"
|
8
8
|
#include "duckdb/storage/table/update_segment.hpp"
|
9
|
+
#include "duckdb/storage/table_storage_info.hpp"
|
9
10
|
#include "duckdb/common/chrono.hpp"
|
10
11
|
#include "duckdb/planner/table_filter.hpp"
|
11
12
|
#include "duckdb/execution/expression_executor.hpp"
|
@@ -502,7 +503,7 @@ void RowGroup::TemplatedScan(TransactionData transaction, CollectionScanState &s
|
|
502
503
|
if (column == COLUMN_IDENTIFIER_ROW_ID) {
|
503
504
|
D_ASSERT(result.data[i].GetType().InternalType() == PhysicalType::INT64);
|
504
505
|
result.data[i].SetVectorType(VectorType::FLAT_VECTOR);
|
505
|
-
auto result_data =
|
506
|
+
auto result_data = FlatVector::GetData<int64_t>(result.data[i]);
|
506
507
|
for (size_t sel_idx = 0; sel_idx < approved_tuple_count; sel_idx++) {
|
507
508
|
result_data[sel_idx] = this->start + current_row + sel.get_index(sel_idx);
|
508
509
|
}
|
@@ -650,7 +651,7 @@ void RowGroup::AppendVersionInfo(TransactionData transaction, idx_t count) {
|
|
650
651
|
} else {
|
651
652
|
D_ASSERT(version_info->info[vector_idx]->type == ChunkInfoType::VECTOR_INFO);
|
652
653
|
// use existing vector
|
653
|
-
info =
|
654
|
+
info = &version_info->info[vector_idx]->Cast<ChunkVectorInfo>();
|
654
655
|
}
|
655
656
|
info->Append(start, end, transaction.transaction_id);
|
656
657
|
}
|
@@ -912,12 +913,12 @@ RowGroupPointer RowGroup::Deserialize(Deserializer &main_source, const vector<Lo
|
|
912
913
|
}
|
913
914
|
|
914
915
|
//===--------------------------------------------------------------------===//
|
915
|
-
//
|
916
|
+
// GetColumnSegmentInfo
|
916
917
|
//===--------------------------------------------------------------------===//
|
917
|
-
void RowGroup::
|
918
|
+
void RowGroup::GetColumnSegmentInfo(idx_t row_group_index, vector<ColumnSegmentInfo> &result) {
|
918
919
|
for (idx_t col_idx = 0; col_idx < GetColumnCount(); col_idx++) {
|
919
920
|
auto &col_data = GetColumn(col_idx);
|
920
|
-
col_data.
|
921
|
+
col_data.GetColumnSegmentInfo(row_group_index, {col_idx}, result);
|
921
922
|
}
|
922
923
|
}
|
923
924
|
|
@@ -985,7 +986,7 @@ void VersionDeleteState::Delete(row_t row_id) {
|
|
985
986
|
info.version_info->info[vector_idx] =
|
986
987
|
make_uniq<ChunkVectorInfo>(info.start + vector_idx * STANDARD_VECTOR_SIZE);
|
987
988
|
} else if (info.version_info->info[vector_idx]->type == ChunkInfoType::CONSTANT_INFO) {
|
988
|
-
auto &constant =
|
989
|
+
auto &constant = info.version_info->info[vector_idx]->Cast<ChunkConstantInfo>();
|
989
990
|
// info exists but it's a constant info: convert to a vector info
|
990
991
|
auto new_info = make_uniq<ChunkVectorInfo>(info.start + vector_idx * STANDARD_VECTOR_SIZE);
|
991
992
|
new_info->insert_id = constant.insert_id.load();
|
@@ -995,7 +996,7 @@ void VersionDeleteState::Delete(row_t row_id) {
|
|
995
996
|
info.version_info->info[vector_idx] = std::move(new_info);
|
996
997
|
}
|
997
998
|
D_ASSERT(info.version_info->info[vector_idx]->type == ChunkInfoType::VECTOR_INFO);
|
998
|
-
current_info =
|
999
|
+
current_info = &info.version_info->info[vector_idx]->Cast<ChunkVectorInfo>();
|
999
1000
|
current_chunk = vector_idx;
|
1000
1001
|
chunk_row = vector_idx * STANDARD_VECTOR_SIZE;
|
1001
1002
|
}
|