duckdb 0.8.1-dev2.0 → 0.8.1-dev219.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.gyp +8 -8
- package/package.json +1 -1
- package/src/duckdb/extension/icu/icu-datepart.cpp +1 -1
- package/src/duckdb/extension/json/include/json_common.hpp +1 -1
- package/src/duckdb/extension/json/include/json_executors.hpp +1 -1
- package/src/duckdb/extension/json/json_functions/json_create.cpp +6 -6
- package/src/duckdb/extension/json/json_functions/json_merge_patch.cpp +1 -1
- package/src/duckdb/extension/json/json_functions/json_transform.cpp +1 -1
- 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 +1 -1
- 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 -21
- package/src/duckdb/src/catalog/catalog_entry/duck_table_entry.cpp +113 -0
- package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +7 -0
- package/src/duckdb/src/catalog/catalog_entry.cpp +4 -4
- 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/catalog/duck_catalog.cpp +1 -0
- package/src/duckdb/src/common/adbc/adbc.cpp +301 -106
- package/src/duckdb/src/common/adbc/driver_manager.cpp +10 -22
- package/src/duckdb/src/common/arrow/arrow_appender.cpp +12 -12
- package/src/duckdb/src/common/arrow/arrow_wrapper.cpp +7 -7
- 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 +19 -14
- package/src/duckdb/src/common/field_writer.cpp +1 -1
- package/src/duckdb/src/common/file_system.cpp +15 -2
- 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/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/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 +59 -24
- package/src/duckdb/src/common/types/string_heap.cpp +1 -1
- package/src/duckdb/src/common/types/value.cpp +3 -2
- package/src/duckdb/src/common/types/vector.cpp +101 -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 +44 -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 +32 -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 +36 -37
- package/src/duckdb/src/core_functions/aggregate/distributive/sum.cpp +22 -22
- package/src/duckdb/src/core_functions/aggregate/holistic/approximate_quantile.cpp +48 -84
- package/src/duckdb/src/core_functions/aggregate/holistic/mode.cpp +49 -51
- package/src/duckdb/src/core_functions/aggregate/holistic/quantile.cpp +97 -121
- package/src/duckdb/src/core_functions/aggregate/holistic/reservoir_quantile.cpp +62 -99
- 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 +45 -45
- 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 +3 -3
- package/src/duckdb/src/core_functions/scalar/list/flatten.cpp +2 -4
- package/src/duckdb/src/core_functions/scalar/list/list_aggregates.cpp +3 -3
- package/src/duckdb/src/core_functions/scalar/list/list_lambdas.cpp +6 -7
- 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 +3 -3
- 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 +33 -28
- package/src/duckdb/src/execution/index/art/art.cpp +30 -32
- package/src/duckdb/src/execution/index/art/fixed_size_allocator.cpp +3 -4
- package/src/duckdb/src/execution/join_hashtable.cpp +4 -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/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_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/csv_reader_options.cpp +2 -0
- 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_unnest.cpp +3 -3
- 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_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 +2 -2
- package/src/duckdb/src/execution/window_segment_tree.cpp +8 -6
- package/src/duckdb/src/function/aggregate/distributive/count.cpp +158 -20
- package/src/duckdb/src/function/aggregate/distributive/first.cpp +66 -74
- package/src/duckdb/src/function/aggregate/sorted_aggregate_function.cpp +13 -13
- 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/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 +3 -3
- package/src/duckdb/src/function/scalar/operators/arithmetic.cpp +2 -3
- 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.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 +25 -23
- 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 +1 -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 +15 -23
- package/src/duckdb/src/function/table/repeat.cpp +2 -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/test_vector_types.cpp +1 -1
- package/src/duckdb/src/function/table/table_scan.cpp +2 -2
- 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 +6 -0
- 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/adbc/adbc.hpp +5 -0
- package/src/duckdb/src/include/duckdb/common/allocator.hpp +15 -4
- package/src/duckdb/src/include/duckdb/common/arrow/arrow_buffer.hpp +7 -2
- 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/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 +3 -3
- 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 +8 -29
- 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 +3 -1
- 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_function.hpp +2 -2
- package/src/duckdb/src/include/duckdb/function/table_function.hpp +6 -6
- package/src/duckdb/src/include/duckdb/main/capi/cast/utils.hpp +1 -1
- package/src/duckdb/src/include/duckdb/main/config.hpp +2 -0
- 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 +17 -0
- package/src/duckdb/src/include/duckdb/main/relation.hpp +12 -0
- package/src/duckdb/src/include/duckdb/main/settings.hpp +9 -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/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 +1 -1
- 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 +107 -91
- 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 +34 -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 +2 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pivot.hpp +3 -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/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/index.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/partial_block_manager.hpp +1 -1
- 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/scan_state.hpp +22 -0
- 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/capi/appender-c.cpp +5 -5
- package/src/duckdb/src/main/capi/arrow-c.cpp +10 -10
- 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 +1 -1
- 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 +3 -3
- package/src/duckdb/src/main/config.cpp +1 -0
- package/src/duckdb/src/main/database_manager.cpp +1 -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/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 +22 -6
- package/src/duckdb/src/optimizer/deliminator.cpp +12 -12
- package/src/duckdb/src/optimizer/expression_heuristics.cpp +1 -0
- 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/join_order/join_order_optimizer.cpp +4 -7
- 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/parallel/executor.cpp +1 -1
- 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_expression.cpp +34 -18
- package/src/duckdb/src/parser/parsed_expression_iterator.cpp +4 -4
- package/src/duckdb/src/parser/parser.cpp +4 -4
- 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 +28 -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/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_database.cpp +3 -4
- 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 -22
- 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 +46 -46
- package/src/duckdb/src/planner/bind_context.cpp +9 -10
- package/src/duckdb/src/planner/binder/expression/bind_function_expression.cpp +1 -1
- package/src/duckdb/src/planner/binder/expression/bind_lambda.cpp +1 -1
- package/src/duckdb/src/planner/binder/expression/bind_positional_reference_expression.cpp +7 -2
- 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 +8 -8
- package/src/duckdb/src/planner/binder/query_node/plan_query_node.cpp +4 -4
- package/src/duckdb/src/planner/binder/statement/bind_create.cpp +13 -5
- 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 +4 -2
- package/src/duckdb/src/planner/binder/tableref/bind_table_function.cpp +17 -7
- package/src/duckdb/src/planner/binder.cpp +1 -1
- package/src/duckdb/src/planner/bound_result_modifier.cpp +16 -11
- package/src/duckdb/src/planner/expression/bound_aggregate_expression.cpp +5 -5
- 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_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 +15 -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/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 +8 -7
- package/src/duckdb/src/storage/index.cpp +1 -3
- package/src/duckdb/src/storage/local_storage.cpp +2 -1
- package/src/duckdb/src/storage/magic_bytes.cpp +1 -1
- 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/table/chunk_info.cpp +2 -2
- 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 +4 -4
- package/src/duckdb/src/storage/table/standard_column_data.cpp +1 -1
- 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/src_backend_parser_gram.cpp +13479 -13564
- package/src/duckdb/third_party/pcg/pcg_extras.hpp +1 -1
- package/src/duckdb/ub_extension_icu_third_party_icu_i18n.cpp +5 -5
@@ -730,7 +730,7 @@ Value Value::EMPTYLIST(const LogicalType &child_type) {
|
|
730
730
|
Value Value::BLOB(const_data_ptr_t data, idx_t len) {
|
731
731
|
Value result(LogicalType::BLOB);
|
732
732
|
result.is_null = false;
|
733
|
-
result.value_info_ = make_shared<StringValueInfo>(string((
|
733
|
+
result.value_info_ = make_shared<StringValueInfo>(string(const_char_ptr_cast(data), len));
|
734
734
|
return result;
|
735
735
|
}
|
736
736
|
|
@@ -744,7 +744,7 @@ Value Value::BLOB(const string &data) {
|
|
744
744
|
Value Value::BIT(const_data_ptr_t data, idx_t len) {
|
745
745
|
Value result(LogicalType::BIT);
|
746
746
|
result.is_null = false;
|
747
|
-
result.value_info_ = make_shared<StringValueInfo>(string((
|
747
|
+
result.value_info_ = make_shared<StringValueInfo>(string(const_char_ptr_cast(data), len));
|
748
748
|
return result;
|
749
749
|
}
|
750
750
|
|
@@ -1319,6 +1319,7 @@ string Value::ToSQLString() const {
|
|
1319
1319
|
case LogicalTypeId::BLOB:
|
1320
1320
|
return "'" + ToString() + "'::" + type_.ToString();
|
1321
1321
|
case LogicalTypeId::VARCHAR:
|
1322
|
+
case LogicalTypeId::ENUM:
|
1322
1323
|
return "'" + StringUtil::Replace(ToString(), "'", "''") + "'";
|
1323
1324
|
case LogicalTypeId::STRUCT: {
|
1324
1325
|
string ret = "{";
|
@@ -100,6 +100,9 @@ void Vector::Reference(const Value &value) {
|
|
100
100
|
}
|
101
101
|
|
102
102
|
void Vector::Reference(Vector &other) {
|
103
|
+
if (other.GetType().id() != GetType().id()) {
|
104
|
+
throw InternalException("Vector::Reference used on vector of different type");
|
105
|
+
}
|
103
106
|
D_ASSERT(other.GetType() == GetType());
|
104
107
|
Reinterpret(other);
|
105
108
|
}
|
@@ -199,7 +202,7 @@ void Vector::Slice(const SelectionVector &sel, idx_t count, SelCache &cache) {
|
|
199
202
|
auto entry = cache.cache.find(target_data);
|
200
203
|
if (entry != cache.cache.end()) {
|
201
204
|
// cached entry exists: use that
|
202
|
-
this->buffer = make_buffer<DictionaryBuffer>(
|
205
|
+
this->buffer = make_buffer<DictionaryBuffer>(entry->second->Cast<DictionaryBuffer>().GetSelVector());
|
203
206
|
vector_type = VectorType::DICTIONARY_VECTOR;
|
204
207
|
} else {
|
205
208
|
Slice(sel, count);
|
@@ -248,7 +251,7 @@ struct DataArrays {
|
|
248
251
|
|
249
252
|
void FindChildren(vector<DataArrays> &to_resize, VectorBuffer &auxiliary) {
|
250
253
|
if (auxiliary.GetBufferType() == VectorBufferType::LIST_BUFFER) {
|
251
|
-
auto &buffer = (
|
254
|
+
auto &buffer = auxiliary.Cast<VectorListBuffer>();
|
252
255
|
auto &child = buffer.GetChild();
|
253
256
|
auto data = child.GetData();
|
254
257
|
if (!data) {
|
@@ -263,7 +266,7 @@ void FindChildren(vector<DataArrays> &to_resize, VectorBuffer &auxiliary) {
|
|
263
266
|
to_resize.emplace_back(arrays);
|
264
267
|
}
|
265
268
|
} else if (auxiliary.GetBufferType() == VectorBufferType::STRUCT_BUFFER) {
|
266
|
-
auto &buffer = (
|
269
|
+
auto &buffer = auxiliary.Cast<VectorStructBuffer>();
|
267
270
|
auto &children = buffer.GetChildren();
|
268
271
|
for (auto &child : children) {
|
269
272
|
auto data = child->GetData();
|
@@ -329,46 +332,46 @@ void Vector::SetValue(idx_t index, const Value &val) {
|
|
329
332
|
|
330
333
|
switch (GetType().InternalType()) {
|
331
334
|
case PhysicalType::BOOL:
|
332
|
-
|
335
|
+
reinterpret_cast<bool *>(data)[index] = val.GetValueUnsafe<bool>();
|
333
336
|
break;
|
334
337
|
case PhysicalType::INT8:
|
335
|
-
|
338
|
+
reinterpret_cast<int8_t *>(data)[index] = val.GetValueUnsafe<int8_t>();
|
336
339
|
break;
|
337
340
|
case PhysicalType::INT16:
|
338
|
-
|
341
|
+
reinterpret_cast<int16_t *>(data)[index] = val.GetValueUnsafe<int16_t>();
|
339
342
|
break;
|
340
343
|
case PhysicalType::INT32:
|
341
|
-
|
344
|
+
reinterpret_cast<int32_t *>(data)[index] = val.GetValueUnsafe<int32_t>();
|
342
345
|
break;
|
343
346
|
case PhysicalType::INT64:
|
344
|
-
|
347
|
+
reinterpret_cast<int64_t *>(data)[index] = val.GetValueUnsafe<int64_t>();
|
345
348
|
break;
|
346
349
|
case PhysicalType::INT128:
|
347
|
-
|
350
|
+
reinterpret_cast<hugeint_t *>(data)[index] = val.GetValueUnsafe<hugeint_t>();
|
348
351
|
break;
|
349
352
|
case PhysicalType::UINT8:
|
350
|
-
|
353
|
+
reinterpret_cast<uint8_t *>(data)[index] = val.GetValueUnsafe<uint8_t>();
|
351
354
|
break;
|
352
355
|
case PhysicalType::UINT16:
|
353
|
-
|
356
|
+
reinterpret_cast<uint16_t *>(data)[index] = val.GetValueUnsafe<uint16_t>();
|
354
357
|
break;
|
355
358
|
case PhysicalType::UINT32:
|
356
|
-
|
359
|
+
reinterpret_cast<uint32_t *>(data)[index] = val.GetValueUnsafe<uint32_t>();
|
357
360
|
break;
|
358
361
|
case PhysicalType::UINT64:
|
359
|
-
|
362
|
+
reinterpret_cast<uint64_t *>(data)[index] = val.GetValueUnsafe<uint64_t>();
|
360
363
|
break;
|
361
364
|
case PhysicalType::FLOAT:
|
362
|
-
|
365
|
+
reinterpret_cast<float *>(data)[index] = val.GetValueUnsafe<float>();
|
363
366
|
break;
|
364
367
|
case PhysicalType::DOUBLE:
|
365
|
-
|
368
|
+
reinterpret_cast<double *>(data)[index] = val.GetValueUnsafe<double>();
|
366
369
|
break;
|
367
370
|
case PhysicalType::INTERVAL:
|
368
|
-
|
371
|
+
reinterpret_cast<interval_t *>(data)[index] = val.GetValueUnsafe<interval_t>();
|
369
372
|
break;
|
370
373
|
case PhysicalType::VARCHAR:
|
371
|
-
|
374
|
+
reinterpret_cast<string_t *>(data)[index] = StringVector::AddStringOrBlob(*this, StringValue::Get(val));
|
372
375
|
break;
|
373
376
|
case PhysicalType::STRUCT: {
|
374
377
|
D_ASSERT(GetVectorType() == VectorType::CONSTANT_VECTOR || GetVectorType() == VectorType::FLAT_VECTOR);
|
@@ -399,7 +402,7 @@ void Vector::SetValue(idx_t index, const Value &val) {
|
|
399
402
|
}
|
400
403
|
}
|
401
404
|
//! now set the pointer
|
402
|
-
auto &entry =
|
405
|
+
auto &entry = reinterpret_cast<list_entry_t *>(data)[index];
|
403
406
|
entry.length = val_children.size();
|
404
407
|
entry.offset = offset;
|
405
408
|
break;
|
@@ -454,64 +457,63 @@ Value Vector::GetValueInternal(const Vector &v_p, idx_t index_p) {
|
|
454
457
|
if (vector->GetType().InternalType() != PhysicalType::VARCHAR) {
|
455
458
|
throw InternalException("FSST Vector with non-string datatype found!");
|
456
459
|
}
|
457
|
-
auto str_compressed =
|
458
|
-
Value result =
|
459
|
-
|
460
|
-
(unsigned char *)str_compressed.GetData(), str_compressed.GetSize());
|
460
|
+
auto str_compressed = reinterpret_cast<string_t *>(data)[index];
|
461
|
+
Value result = FSSTPrimitives::DecompressValue(FSSTVector::GetDecoder(const_cast<Vector &>(*vector)),
|
462
|
+
str_compressed.GetData(), str_compressed.GetSize());
|
461
463
|
return result;
|
462
464
|
}
|
463
465
|
|
464
466
|
switch (vector->GetType().id()) {
|
465
467
|
case LogicalTypeId::BOOLEAN:
|
466
|
-
return Value::BOOLEAN(
|
468
|
+
return Value::BOOLEAN(reinterpret_cast<bool *>(data)[index]);
|
467
469
|
case LogicalTypeId::TINYINT:
|
468
|
-
return Value::TINYINT(
|
470
|
+
return Value::TINYINT(reinterpret_cast<int8_t *>(data)[index]);
|
469
471
|
case LogicalTypeId::SMALLINT:
|
470
|
-
return Value::SMALLINT(
|
472
|
+
return Value::SMALLINT(reinterpret_cast<int16_t *>(data)[index]);
|
471
473
|
case LogicalTypeId::INTEGER:
|
472
|
-
return Value::INTEGER(
|
474
|
+
return Value::INTEGER(reinterpret_cast<int32_t *>(data)[index]);
|
473
475
|
case LogicalTypeId::DATE:
|
474
|
-
return Value::DATE(
|
476
|
+
return Value::DATE(reinterpret_cast<date_t *>(data)[index]);
|
475
477
|
case LogicalTypeId::TIME:
|
476
|
-
return Value::TIME(
|
478
|
+
return Value::TIME(reinterpret_cast<dtime_t *>(data)[index]);
|
477
479
|
case LogicalTypeId::TIME_TZ:
|
478
|
-
return Value::TIMETZ(
|
480
|
+
return Value::TIMETZ(reinterpret_cast<dtime_t *>(data)[index]);
|
479
481
|
case LogicalTypeId::BIGINT:
|
480
|
-
return Value::BIGINT(
|
482
|
+
return Value::BIGINT(reinterpret_cast<int64_t *>(data)[index]);
|
481
483
|
case LogicalTypeId::UTINYINT:
|
482
|
-
return Value::UTINYINT(
|
484
|
+
return Value::UTINYINT(reinterpret_cast<uint8_t *>(data)[index]);
|
483
485
|
case LogicalTypeId::USMALLINT:
|
484
|
-
return Value::USMALLINT(
|
486
|
+
return Value::USMALLINT(reinterpret_cast<uint16_t *>(data)[index]);
|
485
487
|
case LogicalTypeId::UINTEGER:
|
486
|
-
return Value::UINTEGER(
|
488
|
+
return Value::UINTEGER(reinterpret_cast<uint32_t *>(data)[index]);
|
487
489
|
case LogicalTypeId::UBIGINT:
|
488
|
-
return Value::UBIGINT(
|
490
|
+
return Value::UBIGINT(reinterpret_cast<uint64_t *>(data)[index]);
|
489
491
|
case LogicalTypeId::TIMESTAMP:
|
490
|
-
return Value::TIMESTAMP(
|
492
|
+
return Value::TIMESTAMP(reinterpret_cast<timestamp_t *>(data)[index]);
|
491
493
|
case LogicalTypeId::TIMESTAMP_NS:
|
492
|
-
return Value::TIMESTAMPNS(
|
494
|
+
return Value::TIMESTAMPNS(reinterpret_cast<timestamp_t *>(data)[index]);
|
493
495
|
case LogicalTypeId::TIMESTAMP_MS:
|
494
|
-
return Value::TIMESTAMPMS(
|
496
|
+
return Value::TIMESTAMPMS(reinterpret_cast<timestamp_t *>(data)[index]);
|
495
497
|
case LogicalTypeId::TIMESTAMP_SEC:
|
496
|
-
return Value::TIMESTAMPSEC(
|
498
|
+
return Value::TIMESTAMPSEC(reinterpret_cast<timestamp_t *>(data)[index]);
|
497
499
|
case LogicalTypeId::TIMESTAMP_TZ:
|
498
|
-
return Value::TIMESTAMPTZ(
|
500
|
+
return Value::TIMESTAMPTZ(reinterpret_cast<timestamp_t *>(data)[index]);
|
499
501
|
case LogicalTypeId::HUGEINT:
|
500
|
-
return Value::HUGEINT(
|
502
|
+
return Value::HUGEINT(reinterpret_cast<hugeint_t *>(data)[index]);
|
501
503
|
case LogicalTypeId::UUID:
|
502
|
-
return Value::UUID(
|
504
|
+
return Value::UUID(reinterpret_cast<hugeint_t *>(data)[index]);
|
503
505
|
case LogicalTypeId::DECIMAL: {
|
504
506
|
auto width = DecimalType::GetWidth(type);
|
505
507
|
auto scale = DecimalType::GetScale(type);
|
506
508
|
switch (type.InternalType()) {
|
507
509
|
case PhysicalType::INT16:
|
508
|
-
return Value::DECIMAL(
|
510
|
+
return Value::DECIMAL(reinterpret_cast<int16_t *>(data)[index], width, scale);
|
509
511
|
case PhysicalType::INT32:
|
510
|
-
return Value::DECIMAL(
|
512
|
+
return Value::DECIMAL(reinterpret_cast<int32_t *>(data)[index], width, scale);
|
511
513
|
case PhysicalType::INT64:
|
512
|
-
return Value::DECIMAL(
|
514
|
+
return Value::DECIMAL(reinterpret_cast<int64_t *>(data)[index], width, scale);
|
513
515
|
case PhysicalType::INT128:
|
514
|
-
return Value::DECIMAL(
|
516
|
+
return Value::DECIMAL(reinterpret_cast<hugeint_t *>(data)[index], width, scale);
|
515
517
|
default:
|
516
518
|
throw InternalException("Physical type '%s' has a width bigger than 38, which is not supported",
|
517
519
|
TypeIdToString(type.InternalType()));
|
@@ -520,38 +522,38 @@ Value Vector::GetValueInternal(const Vector &v_p, idx_t index_p) {
|
|
520
522
|
case LogicalTypeId::ENUM: {
|
521
523
|
switch (type.InternalType()) {
|
522
524
|
case PhysicalType::UINT8:
|
523
|
-
return Value::ENUM(
|
525
|
+
return Value::ENUM(reinterpret_cast<uint8_t *>(data)[index], type);
|
524
526
|
case PhysicalType::UINT16:
|
525
|
-
return Value::ENUM(
|
527
|
+
return Value::ENUM(reinterpret_cast<uint16_t *>(data)[index], type);
|
526
528
|
case PhysicalType::UINT32:
|
527
|
-
return Value::ENUM(
|
529
|
+
return Value::ENUM(reinterpret_cast<uint32_t *>(data)[index], type);
|
528
530
|
default:
|
529
531
|
throw InternalException("ENUM can only have unsigned integers as physical types");
|
530
532
|
}
|
531
533
|
}
|
532
534
|
case LogicalTypeId::POINTER:
|
533
|
-
return Value::POINTER(
|
535
|
+
return Value::POINTER(reinterpret_cast<uintptr_t *>(data)[index]);
|
534
536
|
case LogicalTypeId::FLOAT:
|
535
|
-
return Value::FLOAT(
|
537
|
+
return Value::FLOAT(reinterpret_cast<float *>(data)[index]);
|
536
538
|
case LogicalTypeId::DOUBLE:
|
537
|
-
return Value::DOUBLE(
|
539
|
+
return Value::DOUBLE(reinterpret_cast<double *>(data)[index]);
|
538
540
|
case LogicalTypeId::INTERVAL:
|
539
|
-
return Value::INTERVAL(
|
541
|
+
return Value::INTERVAL(reinterpret_cast<interval_t *>(data)[index]);
|
540
542
|
case LogicalTypeId::VARCHAR: {
|
541
|
-
auto str =
|
543
|
+
auto str = reinterpret_cast<string_t *>(data)[index];
|
542
544
|
return Value(str.GetString());
|
543
545
|
}
|
544
546
|
case LogicalTypeId::AGGREGATE_STATE:
|
545
547
|
case LogicalTypeId::BLOB: {
|
546
|
-
auto str =
|
547
|
-
return Value::BLOB((
|
548
|
+
auto str = reinterpret_cast<string_t *>(data)[index];
|
549
|
+
return Value::BLOB(const_data_ptr_cast(str.GetData()), str.GetSize());
|
548
550
|
}
|
549
551
|
case LogicalTypeId::BIT: {
|
550
|
-
auto str =
|
551
|
-
return Value::BIT((
|
552
|
+
auto str = reinterpret_cast<string_t *>(data)[index];
|
553
|
+
return Value::BIT(const_data_ptr_cast(str.GetData()), str.GetSize());
|
552
554
|
}
|
553
555
|
case LogicalTypeId::MAP: {
|
554
|
-
auto offlen =
|
556
|
+
auto offlen = reinterpret_cast<list_entry_t *>(data)[index];
|
555
557
|
auto &child_vec = ListVector::GetEntry(*vector);
|
556
558
|
duckdb::vector<Value> children;
|
557
559
|
for (idx_t i = offlen.offset; i < offlen.offset + offlen.length; i++) {
|
@@ -576,7 +578,7 @@ Value Vector::GetValueInternal(const Vector &v_p, idx_t index_p) {
|
|
576
578
|
return Value::STRUCT(std::move(children));
|
577
579
|
}
|
578
580
|
case LogicalTypeId::LIST: {
|
579
|
-
auto offlen =
|
581
|
+
auto offlen = reinterpret_cast<list_entry_t *>(data)[index];
|
580
582
|
auto &child_vec = ListVector::GetEntry(*vector);
|
581
583
|
duckdb::vector<Value> children;
|
582
584
|
for (idx_t i = offlen.offset; i < offlen.offset + offlen.length; i++) {
|
@@ -636,10 +638,9 @@ string Vector::ToString(idx_t count) const {
|
|
636
638
|
break;
|
637
639
|
case VectorType::FSST_VECTOR: {
|
638
640
|
for (idx_t i = 0; i < count; i++) {
|
639
|
-
string_t compressed_string =
|
641
|
+
string_t compressed_string = reinterpret_cast<string_t *>(data)[i];
|
640
642
|
Value val = FSSTPrimitives::DecompressValue(FSSTVector::GetDecoder(const_cast<Vector &>(*this)),
|
641
|
-
(
|
642
|
-
compressed_string.GetSize());
|
643
|
+
compressed_string.GetData(), compressed_string.GetSize());
|
643
644
|
retval += GetValue(i).ToString() + (i == count - 1 ? "" : ", ");
|
644
645
|
}
|
645
646
|
} break;
|
@@ -893,7 +894,7 @@ void Vector::ToUnifiedFormat(idx_t count, UnifiedVectorFormat &data) {
|
|
893
894
|
void Vector::Sequence(int64_t start, int64_t increment, idx_t count) {
|
894
895
|
this->vector_type = VectorType::SEQUENCE_VECTOR;
|
895
896
|
this->buffer = make_buffer<VectorBuffer>(sizeof(int64_t) * 3);
|
896
|
-
auto data =
|
897
|
+
auto data = reinterpret_cast<int64_t *>(buffer->GetData());
|
897
898
|
data[0] = start;
|
898
899
|
data[1] = increment;
|
899
900
|
data[2] = int64_t(count);
|
@@ -915,7 +916,7 @@ void Vector::Serialize(idx_t count, Serializer &serializer) {
|
|
915
916
|
auto row_idx = vdata.sel->get_index(i);
|
916
917
|
flat_mask.Set(i, vdata.validity.RowIsValid(row_idx));
|
917
918
|
}
|
918
|
-
serializer.WriteData((
|
919
|
+
serializer.WriteData(const_data_ptr_cast(flat_mask.GetData()), flat_mask.ValidityMaskSize(count));
|
919
920
|
}
|
920
921
|
if (TypeIsConstantSize(type.InternalType())) {
|
921
922
|
// constant size type: simple copy
|
@@ -926,11 +927,11 @@ void Vector::Serialize(idx_t count, Serializer &serializer) {
|
|
926
927
|
} else {
|
927
928
|
switch (type.InternalType()) {
|
928
929
|
case PhysicalType::VARCHAR: {
|
929
|
-
auto strings = (
|
930
|
+
auto strings = UnifiedVectorFormat::GetData<string_t>(vdata);
|
930
931
|
for (idx_t i = 0; i < count; i++) {
|
931
932
|
auto idx = vdata.sel->get_index(i);
|
932
933
|
auto source = !vdata.validity.RowIsValid(idx) ? NullValue<string_t>() : strings[idx];
|
933
|
-
serializer.WriteStringLen((
|
934
|
+
serializer.WriteStringLen(const_data_ptr_cast(source.GetData()), source.GetSize());
|
934
935
|
}
|
935
936
|
break;
|
936
937
|
}
|
@@ -948,7 +949,7 @@ void Vector::Serialize(idx_t count, Serializer &serializer) {
|
|
948
949
|
|
949
950
|
// serialize the list entries in a flat array
|
950
951
|
auto data = make_unsafe_uniq_array<list_entry_t>(count);
|
951
|
-
auto source_array = (
|
952
|
+
auto source_array = UnifiedVectorFormat::GetData<list_entry_t>(vdata);
|
952
953
|
for (idx_t i = 0; i < count; i++) {
|
953
954
|
auto idx = vdata.sel->get_index(i);
|
954
955
|
auto source = source_array[idx];
|
@@ -958,7 +959,7 @@ void Vector::Serialize(idx_t count, Serializer &serializer) {
|
|
958
959
|
|
959
960
|
// write the list size
|
960
961
|
serializer.Write<idx_t>(list_size);
|
961
|
-
serializer.WriteData((
|
962
|
+
serializer.WriteData(const_data_ptr_cast(data.get()), count * sizeof(list_entry_t));
|
962
963
|
|
963
964
|
child.Serialize(list_size, serializer);
|
964
965
|
break;
|
@@ -983,7 +984,8 @@ void Vector::FormatSerialize(FormatSerializer &serializer, idx_t count) {
|
|
983
984
|
auto row_idx = vdata.sel->get_index(i);
|
984
985
|
flat_mask.Set(i, vdata.validity.RowIsValid(row_idx));
|
985
986
|
}
|
986
|
-
serializer.WriteProperty("validity", (
|
987
|
+
serializer.WriteProperty("validity", const_data_ptr_cast(flat_mask.GetData()),
|
988
|
+
flat_mask.ValidityMaskSize(count));
|
987
989
|
}
|
988
990
|
if (TypeIsConstantSize(logical_type.InternalType())) {
|
989
991
|
// constant size type: simple copy
|
@@ -994,7 +996,7 @@ void Vector::FormatSerialize(FormatSerializer &serializer, idx_t count) {
|
|
994
996
|
} else {
|
995
997
|
switch (logical_type.InternalType()) {
|
996
998
|
case PhysicalType::VARCHAR: {
|
997
|
-
auto strings = (
|
999
|
+
auto strings = UnifiedVectorFormat::GetData<string_t>(vdata);
|
998
1000
|
|
999
1001
|
// Serialize data as a list
|
1000
1002
|
serializer.SetTag("data");
|
@@ -1028,7 +1030,7 @@ void Vector::FormatSerialize(FormatSerializer &serializer, idx_t count) {
|
|
1028
1030
|
|
1029
1031
|
// serialize the list entries in a flat array
|
1030
1032
|
auto entries = make_unsafe_uniq_array<list_entry_t>(count);
|
1031
|
-
auto source_array = (
|
1033
|
+
auto source_array = UnifiedVectorFormat::GetData<list_entry_t>(vdata);
|
1032
1034
|
for (idx_t i = 0; i < count; i++) {
|
1033
1035
|
auto idx = vdata.sel->get_index(i);
|
1034
1036
|
auto source = source_array[idx];
|
@@ -1065,7 +1067,7 @@ void Vector::FormatDeserialize(FormatDeserializer &deserializer, idx_t count) {
|
|
1065
1067
|
const auto has_validity = deserializer.ReadProperty<bool>("all_valid");
|
1066
1068
|
if (has_validity) {
|
1067
1069
|
validity.Initialize(count);
|
1068
|
-
deserializer.ReadProperty("validity", (
|
1070
|
+
deserializer.ReadProperty("validity", data_ptr_cast(validity.GetData()), validity.ValidityMaskSize(count));
|
1069
1071
|
}
|
1070
1072
|
|
1071
1073
|
if (TypeIsConstantSize(logical_type.InternalType())) {
|
@@ -1152,7 +1154,7 @@ void Vector::Deserialize(idx_t count, Deserializer &source) {
|
|
1152
1154
|
const auto has_validity = source.Read<bool>();
|
1153
1155
|
if (has_validity) {
|
1154
1156
|
validity.Initialize(count);
|
1155
|
-
source.ReadData((
|
1157
|
+
source.ReadData(data_ptr_cast(validity.GetData()), validity.ValidityMaskSize(count));
|
1156
1158
|
}
|
1157
1159
|
|
1158
1160
|
if (TypeIsConstantSize(type.InternalType())) {
|
@@ -1503,7 +1505,7 @@ void ConstantVector::Reference(Vector &vector, Vector &source, idx_t position, i
|
|
1503
1505
|
break;
|
1504
1506
|
}
|
1505
1507
|
|
1506
|
-
auto list_data = (
|
1508
|
+
auto list_data = UnifiedVectorFormat::GetData<list_entry_t>(vdata);
|
1507
1509
|
auto list_entry = list_data[list_index];
|
1508
1510
|
|
1509
1511
|
// add the list entry as the first element of "vector"
|
@@ -1580,7 +1582,7 @@ string_t StringVector::AddString(Vector &vector, string_t data) {
|
|
1580
1582
|
vector.auxiliary = make_buffer<VectorStringBuffer>();
|
1581
1583
|
}
|
1582
1584
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::STRING_BUFFER);
|
1583
|
-
auto &string_buffer =
|
1585
|
+
auto &string_buffer = vector.auxiliary->Cast<VectorStringBuffer>();
|
1584
1586
|
return string_buffer.AddString(data);
|
1585
1587
|
}
|
1586
1588
|
|
@@ -1594,7 +1596,7 @@ string_t StringVector::AddStringOrBlob(Vector &vector, string_t data) {
|
|
1594
1596
|
vector.auxiliary = make_buffer<VectorStringBuffer>();
|
1595
1597
|
}
|
1596
1598
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::STRING_BUFFER);
|
1597
|
-
auto &string_buffer =
|
1599
|
+
auto &string_buffer = vector.auxiliary->Cast<VectorStringBuffer>();
|
1598
1600
|
return string_buffer.AddBlob(data);
|
1599
1601
|
}
|
1600
1602
|
|
@@ -1607,7 +1609,7 @@ string_t StringVector::EmptyString(Vector &vector, idx_t len) {
|
|
1607
1609
|
vector.auxiliary = make_buffer<VectorStringBuffer>();
|
1608
1610
|
}
|
1609
1611
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::STRING_BUFFER);
|
1610
|
-
auto &string_buffer =
|
1612
|
+
auto &string_buffer = vector.auxiliary->Cast<VectorStringBuffer>();
|
1611
1613
|
return string_buffer.EmptyString(len);
|
1612
1614
|
}
|
1613
1615
|
|
@@ -1616,7 +1618,7 @@ void StringVector::AddHandle(Vector &vector, BufferHandle handle) {
|
|
1616
1618
|
if (!vector.auxiliary) {
|
1617
1619
|
vector.auxiliary = make_buffer<VectorStringBuffer>();
|
1618
1620
|
}
|
1619
|
-
auto &string_buffer =
|
1621
|
+
auto &string_buffer = vector.auxiliary->Cast<VectorStringBuffer>();
|
1620
1622
|
string_buffer.AddHeapReference(make_buffer<ManagedVectorBuffer>(std::move(handle)));
|
1621
1623
|
}
|
1622
1624
|
|
@@ -1626,7 +1628,7 @@ void StringVector::AddBuffer(Vector &vector, buffer_ptr<VectorBuffer> buffer) {
|
|
1626
1628
|
if (!vector.auxiliary) {
|
1627
1629
|
vector.auxiliary = make_buffer<VectorStringBuffer>();
|
1628
1630
|
}
|
1629
|
-
auto &string_buffer =
|
1631
|
+
auto &string_buffer = vector.auxiliary->Cast<VectorStringBuffer>();
|
1630
1632
|
string_buffer.AddHeapReference(std::move(buffer));
|
1631
1633
|
}
|
1632
1634
|
|
@@ -1661,7 +1663,7 @@ string_t FSSTVector::AddCompressedString(Vector &vector, string_t data) {
|
|
1661
1663
|
vector.auxiliary = make_buffer<VectorFSSTStringBuffer>();
|
1662
1664
|
}
|
1663
1665
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::FSST_BUFFER);
|
1664
|
-
auto &fsst_string_buffer =
|
1666
|
+
auto &fsst_string_buffer = vector.auxiliary->Cast<VectorFSSTStringBuffer>();
|
1665
1667
|
return fsst_string_buffer.AddBlob(data);
|
1666
1668
|
}
|
1667
1669
|
|
@@ -1671,8 +1673,8 @@ void *FSSTVector::GetDecoder(const Vector &vector) {
|
|
1671
1673
|
throw InternalException("GetDecoder called on FSST Vector without registered buffer");
|
1672
1674
|
}
|
1673
1675
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::FSST_BUFFER);
|
1674
|
-
auto &fsst_string_buffer =
|
1675
|
-
return
|
1676
|
+
auto &fsst_string_buffer = vector.auxiliary->Cast<VectorFSSTStringBuffer>();
|
1677
|
+
return fsst_string_buffer.GetDecoder();
|
1676
1678
|
}
|
1677
1679
|
|
1678
1680
|
void FSSTVector::RegisterDecoder(Vector &vector, buffer_ptr<void> &duckdb_fsst_decoder) {
|
@@ -1683,7 +1685,7 @@ void FSSTVector::RegisterDecoder(Vector &vector, buffer_ptr<void> &duckdb_fsst_d
|
|
1683
1685
|
}
|
1684
1686
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::FSST_BUFFER);
|
1685
1687
|
|
1686
|
-
auto &fsst_string_buffer =
|
1688
|
+
auto &fsst_string_buffer = vector.auxiliary->Cast<VectorFSSTStringBuffer>();
|
1687
1689
|
fsst_string_buffer.AddDecoder(duckdb_fsst_decoder);
|
1688
1690
|
}
|
1689
1691
|
|
@@ -1695,7 +1697,7 @@ void FSSTVector::SetCount(Vector &vector, idx_t count) {
|
|
1695
1697
|
}
|
1696
1698
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::FSST_BUFFER);
|
1697
1699
|
|
1698
|
-
auto &fsst_string_buffer =
|
1700
|
+
auto &fsst_string_buffer = vector.auxiliary->Cast<VectorFSSTStringBuffer>();
|
1699
1701
|
fsst_string_buffer.SetCount(count);
|
1700
1702
|
}
|
1701
1703
|
|
@@ -1707,7 +1709,7 @@ idx_t FSSTVector::GetCount(Vector &vector) {
|
|
1707
1709
|
}
|
1708
1710
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::FSST_BUFFER);
|
1709
1711
|
|
1710
|
-
auto &fsst_string_buffer =
|
1712
|
+
auto &fsst_string_buffer = vector.auxiliary->Cast<VectorFSSTStringBuffer>();
|
1711
1713
|
return fsst_string_buffer.GetCount();
|
1712
1714
|
}
|
1713
1715
|
|
@@ -1723,9 +1725,8 @@ void FSSTVector::DecompressVector(const Vector &src, Vector &dst, idx_t src_offs
|
|
1723
1725
|
auto target_idx = dst_offset + i;
|
1724
1726
|
string_t compressed_string = ldata[source_idx];
|
1725
1727
|
if (dst_mask.RowIsValid(target_idx) && compressed_string.GetSize() > 0) {
|
1726
|
-
tdata[target_idx] = FSSTPrimitives::DecompressValue(
|
1727
|
-
|
1728
|
-
compressed_string.GetSize());
|
1728
|
+
tdata[target_idx] = FSSTPrimitives::DecompressValue(
|
1729
|
+
FSSTVector::GetDecoder(src), dst, compressed_string.GetData(), compressed_string.GetSize());
|
1729
1730
|
} else {
|
1730
1731
|
tdata[target_idx] = string_t(nullptr, 0);
|
1731
1732
|
}
|
@@ -1824,7 +1825,7 @@ vector<unique_ptr<Vector>> &StructVector::GetEntries(Vector &vector) {
|
|
1824
1825
|
vector.GetVectorType() == VectorType::CONSTANT_VECTOR);
|
1825
1826
|
D_ASSERT(vector.auxiliary);
|
1826
1827
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::STRUCT_BUFFER);
|
1827
|
-
return
|
1828
|
+
return vector.auxiliary->Cast<VectorStructBuffer>().GetChildren();
|
1828
1829
|
}
|
1829
1830
|
|
1830
1831
|
const vector<unique_ptr<Vector>> &StructVector::GetEntries(const Vector &vector) {
|
@@ -1844,7 +1845,7 @@ const Vector &ListVector::GetEntry(const Vector &vector) {
|
|
1844
1845
|
vector.GetVectorType() == VectorType::CONSTANT_VECTOR);
|
1845
1846
|
D_ASSERT(vector.auxiliary);
|
1846
1847
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::LIST_BUFFER);
|
1847
|
-
return
|
1848
|
+
return vector.auxiliary->Cast<VectorListBuffer>().GetChild();
|
1848
1849
|
}
|
1849
1850
|
|
1850
1851
|
Vector &ListVector::GetEntry(Vector &vector) {
|
@@ -1858,7 +1859,7 @@ void ListVector::Reserve(Vector &vector, idx_t required_capacity) {
|
|
1858
1859
|
vector.GetVectorType() == VectorType::CONSTANT_VECTOR);
|
1859
1860
|
D_ASSERT(vector.auxiliary);
|
1860
1861
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::LIST_BUFFER);
|
1861
|
-
auto &child_buffer =
|
1862
|
+
auto &child_buffer = vector.auxiliary->Cast<VectorListBuffer>();
|
1862
1863
|
child_buffer.Reserve(required_capacity);
|
1863
1864
|
}
|
1864
1865
|
|
@@ -1868,7 +1869,7 @@ idx_t ListVector::GetListSize(const Vector &vec) {
|
|
1868
1869
|
return ListVector::GetListSize(child);
|
1869
1870
|
}
|
1870
1871
|
D_ASSERT(vec.auxiliary);
|
1871
|
-
return
|
1872
|
+
return vec.auxiliary->Cast<VectorListBuffer>().GetSize();
|
1872
1873
|
}
|
1873
1874
|
|
1874
1875
|
idx_t ListVector::GetListCapacity(const Vector &vec) {
|
@@ -1877,7 +1878,7 @@ idx_t ListVector::GetListCapacity(const Vector &vec) {
|
|
1877
1878
|
return ListVector::GetListSize(child);
|
1878
1879
|
}
|
1879
1880
|
D_ASSERT(vec.auxiliary);
|
1880
|
-
return
|
1881
|
+
return vec.auxiliary->Cast<VectorListBuffer>().GetCapacity();
|
1881
1882
|
}
|
1882
1883
|
|
1883
1884
|
void ListVector::ReferenceEntry(Vector &vector, Vector &other) {
|
@@ -1894,7 +1895,7 @@ void ListVector::SetListSize(Vector &vec, idx_t size) {
|
|
1894
1895
|
auto &child = DictionaryVector::Child(vec);
|
1895
1896
|
ListVector::SetListSize(child, size);
|
1896
1897
|
}
|
1897
|
-
|
1898
|
+
vec.auxiliary->Cast<VectorListBuffer>().SetSize(size);
|
1898
1899
|
}
|
1899
1900
|
|
1900
1901
|
void ListVector::Append(Vector &target, const Vector &source, idx_t source_size, idx_t source_offset) {
|
@@ -1902,7 +1903,7 @@ void ListVector::Append(Vector &target, const Vector &source, idx_t source_size,
|
|
1902
1903
|
//! Nothing to add
|
1903
1904
|
return;
|
1904
1905
|
}
|
1905
|
-
auto &target_buffer =
|
1906
|
+
auto &target_buffer = target.auxiliary->Cast<VectorListBuffer>();
|
1906
1907
|
target_buffer.Append(source, source_size, source_offset);
|
1907
1908
|
}
|
1908
1909
|
|
@@ -1912,12 +1913,12 @@ void ListVector::Append(Vector &target, const Vector &source, const SelectionVec
|
|
1912
1913
|
//! Nothing to add
|
1913
1914
|
return;
|
1914
1915
|
}
|
1915
|
-
auto &target_buffer =
|
1916
|
+
auto &target_buffer = target.auxiliary->Cast<VectorListBuffer>();
|
1916
1917
|
target_buffer.Append(source, sel, source_size, source_offset);
|
1917
1918
|
}
|
1918
1919
|
|
1919
1920
|
void ListVector::PushBack(Vector &target, const Value &insert) {
|
1920
|
-
auto &target_buffer =
|
1921
|
+
auto &target_buffer = target.auxiliary->Cast<VectorListBuffer>();
|
1921
1922
|
target_buffer.PushBack(insert);
|
1922
1923
|
}
|
1923
1924
|
|
@@ -1939,7 +1940,7 @@ ConsecutiveChildListInfo ListVector::GetConsecutiveChildListInfo(Vector &list, i
|
|
1939
1940
|
ConsecutiveChildListInfo info;
|
1940
1941
|
UnifiedVectorFormat unified_list_data;
|
1941
1942
|
list.ToUnifiedFormat(offset + count, unified_list_data);
|
1942
|
-
auto list_data = (
|
1943
|
+
auto list_data = UnifiedVectorFormat::GetData<list_entry_t>(unified_list_data);
|
1943
1944
|
|
1944
1945
|
// find the first non-NULL entry
|
1945
1946
|
idx_t first_length = 0;
|
@@ -1989,10 +1990,9 @@ ConsecutiveChildListInfo ListVector::GetConsecutiveChildListInfo(Vector &list, i
|
|
1989
1990
|
}
|
1990
1991
|
|
1991
1992
|
void ListVector::GetConsecutiveChildSelVector(Vector &list, SelectionVector &sel, idx_t offset, idx_t count) {
|
1992
|
-
|
1993
1993
|
UnifiedVectorFormat unified_list_data;
|
1994
1994
|
list.ToUnifiedFormat(offset + count, unified_list_data);
|
1995
|
-
auto list_data = (
|
1995
|
+
auto list_data = UnifiedVectorFormat::GetData<list_entry_t>(unified_list_data);
|
1996
1996
|
|
1997
1997
|
// SelectionVector child_sel(info.second.length);
|
1998
1998
|
idx_t entry = 0;
|
@@ -2127,7 +2127,7 @@ UnionInvalidReason UnionVector::CheckUnionValidity(Vector &vector, idx_t count,
|
|
2127
2127
|
continue;
|
2128
2128
|
}
|
2129
2129
|
|
2130
|
-
auto tag = ((
|
2130
|
+
auto tag = (UnifiedVectorFormat::GetData<union_tag_t>(tags_vdata))[tag_mapped_row_idx];
|
2131
2131
|
if (tag >= member_count) {
|
2132
2132
|
return UnionInvalidReason::TAG_OUT_OF_RANGE;
|
2133
2133
|
}
|
@@ -48,8 +48,8 @@ public:
|
|
48
48
|
// reinitialize the VectorListBuffer
|
49
49
|
AssignSharedPointer(result.auxiliary, auxiliary);
|
50
50
|
// propagate through child
|
51
|
-
auto &child_cache =
|
52
|
-
auto &list_buffer =
|
51
|
+
auto &child_cache = child_caches[0]->Cast<VectorCacheBuffer>();
|
52
|
+
auto &list_buffer = result.auxiliary->Cast<VectorListBuffer>();
|
53
53
|
list_buffer.SetCapacity(child_cache.capacity);
|
54
54
|
list_buffer.SetSize(0);
|
55
55
|
list_buffer.SetAuxiliaryData(nullptr);
|
@@ -65,9 +65,9 @@ public:
|
|
65
65
|
auxiliary->SetAuxiliaryData(nullptr);
|
66
66
|
AssignSharedPointer(result.auxiliary, auxiliary);
|
67
67
|
// propagate through children
|
68
|
-
auto &children =
|
68
|
+
auto &children = result.auxiliary->Cast<VectorStructBuffer>().GetChildren();
|
69
69
|
for (idx_t i = 0; i < children.size(); i++) {
|
70
|
-
auto &child_cache =
|
70
|
+
auto &child_cache = child_caches[i]->Cast<VectorCacheBuffer>();
|
71
71
|
child_cache.ResetFromCache(*children[i], child_caches[i]);
|
72
72
|
}
|
73
73
|
break;
|
@@ -103,12 +103,12 @@ VectorCache::VectorCache(Allocator &allocator, const LogicalType &type_p, idx_t
|
|
103
103
|
|
104
104
|
void VectorCache::ResetFromCache(Vector &result) const {
|
105
105
|
D_ASSERT(buffer);
|
106
|
-
auto &vcache = (
|
106
|
+
auto &vcache = buffer->Cast<VectorCacheBuffer>();
|
107
107
|
vcache.ResetFromCache(result, buffer);
|
108
108
|
}
|
109
109
|
|
110
110
|
const LogicalType &VectorCache::GetType() const {
|
111
|
-
auto &vcache = (
|
111
|
+
auto &vcache = buffer->Cast<VectorCacheBuffer>();
|
112
112
|
return vcache.GetType();
|
113
113
|
}
|
114
114
|
|
@@ -3,7 +3,8 @@
|
|
3
3
|
namespace duckdb {
|
4
4
|
|
5
5
|
const SelectionVector *ConstantVector::ZeroSelectionVector() {
|
6
|
-
static const SelectionVector ZERO_SELECTION_VECTOR =
|
6
|
+
static const SelectionVector ZERO_SELECTION_VECTOR =
|
7
|
+
SelectionVector(const_cast<sel_t *>(ConstantVector::ZERO_VECTOR)); // NOLINT
|
7
8
|
return &ZERO_SELECTION_VECTOR;
|
8
9
|
}
|
9
10
|
|