duckdb 0.8.1-dev51.0 → 0.8.1-dev96.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/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 +52 -51
- 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/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_set.cpp +1 -1
- package/src/duckdb/src/catalog/dependency_manager.cpp +2 -2
- 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/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/tuple_data_allocator.cpp +5 -3
- package/src/duckdb/src/common/types/row/tuple_data_scatter_gather.cpp +17 -17
- package/src/duckdb/src/common/types/string_heap.cpp +1 -1
- package/src/duckdb/src/common/types/value.cpp +2 -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 +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/distributive/approx_count.cpp +3 -3
- package/src/duckdb/src/core_functions/aggregate/distributive/arg_min_max.cpp +3 -3
- package/src/duckdb/src/core_functions/aggregate/distributive/bitagg.cpp +4 -4
- package/src/duckdb/src/core_functions/aggregate/distributive/bitstring_agg.cpp +12 -11
- package/src/duckdb/src/core_functions/aggregate/distributive/bool.cpp +3 -3
- package/src/duckdb/src/core_functions/aggregate/distributive/entropy.cpp +3 -3
- package/src/duckdb/src/core_functions/aggregate/distributive/kurtosis.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/distributive/minmax.cpp +7 -7
- package/src/duckdb/src/core_functions/aggregate/distributive/product.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/distributive/skew.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/distributive/string_agg.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/holistic/approximate_quantile.cpp +14 -14
- package/src/duckdb/src/core_functions/aggregate/holistic/mode.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/holistic/quantile.cpp +21 -21
- package/src/duckdb/src/core_functions/aggregate/holistic/reservoir_quantile.cpp +18 -19
- package/src/duckdb/src/core_functions/aggregate/nested/histogram.cpp +3 -4
- package/src/duckdb/src/core_functions/aggregate/nested/list.cpp +4 -4
- package/src/duckdb/src/core_functions/aggregate/regression/regr_avg.cpp +4 -4
- package/src/duckdb/src/core_functions/aggregate/regression/regr_intercept.cpp +1 -1
- package/src/duckdb/src/core_functions/aggregate/regression/regr_r2.cpp +1 -1
- package/src/duckdb/src/core_functions/aggregate/regression/regr_sxx_syy.cpp +2 -2
- package/src/duckdb/src/core_functions/aggregate/regression/regr_sxy.cpp +1 -1
- 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/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 +1 -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 +28 -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/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/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 +2 -2
- package/src/duckdb/src/function/aggregate/distributive/first.cpp +5 -5
- package/src/duckdb/src/function/aggregate/sorted_aggregate_function.cpp +8 -8
- 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/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 +4 -4
- 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 +4 -4
- package/src/duckdb/src/function/table/repeat.cpp +2 -2
- package/src/duckdb/src/function/table/repeat_row.cpp +2 -2
- 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 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry.hpp +2 -2
- 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 +2 -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 +20 -19
- 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 +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/algebraic/covar.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/algebraic/stddev.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/regression/regr_count.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/regression/regr_slope.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/sum_helpers.hpp +2 -2
- 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/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/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/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/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/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 +1 -1
- 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 +1 -1
- 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/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/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/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/parallel/executor.cpp +1 -1
- package/src/duckdb/src/parser/base_expression.cpp +2 -5
- 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 +3 -3
- 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 +69 -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 +27 -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 +6 -6
- 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_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 +1 -1
- package/src/duckdb/src/planner/binder/statement/bind_insert.cpp +2 -2
- package/src/duckdb/src/planner/binder/statement/bind_update.cpp +1 -1
- package/src/duckdb/src/planner/binder/tableref/bind_pivot.cpp +1 -1
- package/src/duckdb/src/planner/binder/tableref/bind_table_function.cpp +2 -2
- 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_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 +2 -2
- 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 +3 -3
- 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 +1 -1
- 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/pcg/pcg_extras.hpp +1 -1
@@ -202,7 +202,7 @@ void Vector::Slice(const SelectionVector &sel, idx_t count, SelCache &cache) {
|
|
202
202
|
auto entry = cache.cache.find(target_data);
|
203
203
|
if (entry != cache.cache.end()) {
|
204
204
|
// cached entry exists: use that
|
205
|
-
this->buffer = make_buffer<DictionaryBuffer>(
|
205
|
+
this->buffer = make_buffer<DictionaryBuffer>(entry->second->Cast<DictionaryBuffer>().GetSelVector());
|
206
206
|
vector_type = VectorType::DICTIONARY_VECTOR;
|
207
207
|
} else {
|
208
208
|
Slice(sel, count);
|
@@ -251,7 +251,7 @@ struct DataArrays {
|
|
251
251
|
|
252
252
|
void FindChildren(vector<DataArrays> &to_resize, VectorBuffer &auxiliary) {
|
253
253
|
if (auxiliary.GetBufferType() == VectorBufferType::LIST_BUFFER) {
|
254
|
-
auto &buffer = (
|
254
|
+
auto &buffer = auxiliary.Cast<VectorListBuffer>();
|
255
255
|
auto &child = buffer.GetChild();
|
256
256
|
auto data = child.GetData();
|
257
257
|
if (!data) {
|
@@ -266,7 +266,7 @@ void FindChildren(vector<DataArrays> &to_resize, VectorBuffer &auxiliary) {
|
|
266
266
|
to_resize.emplace_back(arrays);
|
267
267
|
}
|
268
268
|
} else if (auxiliary.GetBufferType() == VectorBufferType::STRUCT_BUFFER) {
|
269
|
-
auto &buffer = (
|
269
|
+
auto &buffer = auxiliary.Cast<VectorStructBuffer>();
|
270
270
|
auto &children = buffer.GetChildren();
|
271
271
|
for (auto &child : children) {
|
272
272
|
auto data = child->GetData();
|
@@ -332,46 +332,46 @@ void Vector::SetValue(idx_t index, const Value &val) {
|
|
332
332
|
|
333
333
|
switch (GetType().InternalType()) {
|
334
334
|
case PhysicalType::BOOL:
|
335
|
-
|
335
|
+
reinterpret_cast<bool *>(data)[index] = val.GetValueUnsafe<bool>();
|
336
336
|
break;
|
337
337
|
case PhysicalType::INT8:
|
338
|
-
|
338
|
+
reinterpret_cast<int8_t *>(data)[index] = val.GetValueUnsafe<int8_t>();
|
339
339
|
break;
|
340
340
|
case PhysicalType::INT16:
|
341
|
-
|
341
|
+
reinterpret_cast<int16_t *>(data)[index] = val.GetValueUnsafe<int16_t>();
|
342
342
|
break;
|
343
343
|
case PhysicalType::INT32:
|
344
|
-
|
344
|
+
reinterpret_cast<int32_t *>(data)[index] = val.GetValueUnsafe<int32_t>();
|
345
345
|
break;
|
346
346
|
case PhysicalType::INT64:
|
347
|
-
|
347
|
+
reinterpret_cast<int64_t *>(data)[index] = val.GetValueUnsafe<int64_t>();
|
348
348
|
break;
|
349
349
|
case PhysicalType::INT128:
|
350
|
-
|
350
|
+
reinterpret_cast<hugeint_t *>(data)[index] = val.GetValueUnsafe<hugeint_t>();
|
351
351
|
break;
|
352
352
|
case PhysicalType::UINT8:
|
353
|
-
|
353
|
+
reinterpret_cast<uint8_t *>(data)[index] = val.GetValueUnsafe<uint8_t>();
|
354
354
|
break;
|
355
355
|
case PhysicalType::UINT16:
|
356
|
-
|
356
|
+
reinterpret_cast<uint16_t *>(data)[index] = val.GetValueUnsafe<uint16_t>();
|
357
357
|
break;
|
358
358
|
case PhysicalType::UINT32:
|
359
|
-
|
359
|
+
reinterpret_cast<uint32_t *>(data)[index] = val.GetValueUnsafe<uint32_t>();
|
360
360
|
break;
|
361
361
|
case PhysicalType::UINT64:
|
362
|
-
|
362
|
+
reinterpret_cast<uint64_t *>(data)[index] = val.GetValueUnsafe<uint64_t>();
|
363
363
|
break;
|
364
364
|
case PhysicalType::FLOAT:
|
365
|
-
|
365
|
+
reinterpret_cast<float *>(data)[index] = val.GetValueUnsafe<float>();
|
366
366
|
break;
|
367
367
|
case PhysicalType::DOUBLE:
|
368
|
-
|
368
|
+
reinterpret_cast<double *>(data)[index] = val.GetValueUnsafe<double>();
|
369
369
|
break;
|
370
370
|
case PhysicalType::INTERVAL:
|
371
|
-
|
371
|
+
reinterpret_cast<interval_t *>(data)[index] = val.GetValueUnsafe<interval_t>();
|
372
372
|
break;
|
373
373
|
case PhysicalType::VARCHAR:
|
374
|
-
|
374
|
+
reinterpret_cast<string_t *>(data)[index] = StringVector::AddStringOrBlob(*this, StringValue::Get(val));
|
375
375
|
break;
|
376
376
|
case PhysicalType::STRUCT: {
|
377
377
|
D_ASSERT(GetVectorType() == VectorType::CONSTANT_VECTOR || GetVectorType() == VectorType::FLAT_VECTOR);
|
@@ -402,7 +402,7 @@ void Vector::SetValue(idx_t index, const Value &val) {
|
|
402
402
|
}
|
403
403
|
}
|
404
404
|
//! now set the pointer
|
405
|
-
auto &entry =
|
405
|
+
auto &entry = reinterpret_cast<list_entry_t *>(data)[index];
|
406
406
|
entry.length = val_children.size();
|
407
407
|
entry.offset = offset;
|
408
408
|
break;
|
@@ -457,64 +457,63 @@ Value Vector::GetValueInternal(const Vector &v_p, idx_t index_p) {
|
|
457
457
|
if (vector->GetType().InternalType() != PhysicalType::VARCHAR) {
|
458
458
|
throw InternalException("FSST Vector with non-string datatype found!");
|
459
459
|
}
|
460
|
-
auto str_compressed =
|
461
|
-
Value result =
|
462
|
-
|
463
|
-
(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());
|
464
463
|
return result;
|
465
464
|
}
|
466
465
|
|
467
466
|
switch (vector->GetType().id()) {
|
468
467
|
case LogicalTypeId::BOOLEAN:
|
469
|
-
return Value::BOOLEAN(
|
468
|
+
return Value::BOOLEAN(reinterpret_cast<bool *>(data)[index]);
|
470
469
|
case LogicalTypeId::TINYINT:
|
471
|
-
return Value::TINYINT(
|
470
|
+
return Value::TINYINT(reinterpret_cast<int8_t *>(data)[index]);
|
472
471
|
case LogicalTypeId::SMALLINT:
|
473
|
-
return Value::SMALLINT(
|
472
|
+
return Value::SMALLINT(reinterpret_cast<int16_t *>(data)[index]);
|
474
473
|
case LogicalTypeId::INTEGER:
|
475
|
-
return Value::INTEGER(
|
474
|
+
return Value::INTEGER(reinterpret_cast<int32_t *>(data)[index]);
|
476
475
|
case LogicalTypeId::DATE:
|
477
|
-
return Value::DATE(
|
476
|
+
return Value::DATE(reinterpret_cast<date_t *>(data)[index]);
|
478
477
|
case LogicalTypeId::TIME:
|
479
|
-
return Value::TIME(
|
478
|
+
return Value::TIME(reinterpret_cast<dtime_t *>(data)[index]);
|
480
479
|
case LogicalTypeId::TIME_TZ:
|
481
|
-
return Value::TIMETZ(
|
480
|
+
return Value::TIMETZ(reinterpret_cast<dtime_t *>(data)[index]);
|
482
481
|
case LogicalTypeId::BIGINT:
|
483
|
-
return Value::BIGINT(
|
482
|
+
return Value::BIGINT(reinterpret_cast<int64_t *>(data)[index]);
|
484
483
|
case LogicalTypeId::UTINYINT:
|
485
|
-
return Value::UTINYINT(
|
484
|
+
return Value::UTINYINT(reinterpret_cast<uint8_t *>(data)[index]);
|
486
485
|
case LogicalTypeId::USMALLINT:
|
487
|
-
return Value::USMALLINT(
|
486
|
+
return Value::USMALLINT(reinterpret_cast<uint16_t *>(data)[index]);
|
488
487
|
case LogicalTypeId::UINTEGER:
|
489
|
-
return Value::UINTEGER(
|
488
|
+
return Value::UINTEGER(reinterpret_cast<uint32_t *>(data)[index]);
|
490
489
|
case LogicalTypeId::UBIGINT:
|
491
|
-
return Value::UBIGINT(
|
490
|
+
return Value::UBIGINT(reinterpret_cast<uint64_t *>(data)[index]);
|
492
491
|
case LogicalTypeId::TIMESTAMP:
|
493
|
-
return Value::TIMESTAMP(
|
492
|
+
return Value::TIMESTAMP(reinterpret_cast<timestamp_t *>(data)[index]);
|
494
493
|
case LogicalTypeId::TIMESTAMP_NS:
|
495
|
-
return Value::TIMESTAMPNS(
|
494
|
+
return Value::TIMESTAMPNS(reinterpret_cast<timestamp_t *>(data)[index]);
|
496
495
|
case LogicalTypeId::TIMESTAMP_MS:
|
497
|
-
return Value::TIMESTAMPMS(
|
496
|
+
return Value::TIMESTAMPMS(reinterpret_cast<timestamp_t *>(data)[index]);
|
498
497
|
case LogicalTypeId::TIMESTAMP_SEC:
|
499
|
-
return Value::TIMESTAMPSEC(
|
498
|
+
return Value::TIMESTAMPSEC(reinterpret_cast<timestamp_t *>(data)[index]);
|
500
499
|
case LogicalTypeId::TIMESTAMP_TZ:
|
501
|
-
return Value::TIMESTAMPTZ(
|
500
|
+
return Value::TIMESTAMPTZ(reinterpret_cast<timestamp_t *>(data)[index]);
|
502
501
|
case LogicalTypeId::HUGEINT:
|
503
|
-
return Value::HUGEINT(
|
502
|
+
return Value::HUGEINT(reinterpret_cast<hugeint_t *>(data)[index]);
|
504
503
|
case LogicalTypeId::UUID:
|
505
|
-
return Value::UUID(
|
504
|
+
return Value::UUID(reinterpret_cast<hugeint_t *>(data)[index]);
|
506
505
|
case LogicalTypeId::DECIMAL: {
|
507
506
|
auto width = DecimalType::GetWidth(type);
|
508
507
|
auto scale = DecimalType::GetScale(type);
|
509
508
|
switch (type.InternalType()) {
|
510
509
|
case PhysicalType::INT16:
|
511
|
-
return Value::DECIMAL(
|
510
|
+
return Value::DECIMAL(reinterpret_cast<int16_t *>(data)[index], width, scale);
|
512
511
|
case PhysicalType::INT32:
|
513
|
-
return Value::DECIMAL(
|
512
|
+
return Value::DECIMAL(reinterpret_cast<int32_t *>(data)[index], width, scale);
|
514
513
|
case PhysicalType::INT64:
|
515
|
-
return Value::DECIMAL(
|
514
|
+
return Value::DECIMAL(reinterpret_cast<int64_t *>(data)[index], width, scale);
|
516
515
|
case PhysicalType::INT128:
|
517
|
-
return Value::DECIMAL(
|
516
|
+
return Value::DECIMAL(reinterpret_cast<hugeint_t *>(data)[index], width, scale);
|
518
517
|
default:
|
519
518
|
throw InternalException("Physical type '%s' has a width bigger than 38, which is not supported",
|
520
519
|
TypeIdToString(type.InternalType()));
|
@@ -523,38 +522,38 @@ Value Vector::GetValueInternal(const Vector &v_p, idx_t index_p) {
|
|
523
522
|
case LogicalTypeId::ENUM: {
|
524
523
|
switch (type.InternalType()) {
|
525
524
|
case PhysicalType::UINT8:
|
526
|
-
return Value::ENUM(
|
525
|
+
return Value::ENUM(reinterpret_cast<uint8_t *>(data)[index], type);
|
527
526
|
case PhysicalType::UINT16:
|
528
|
-
return Value::ENUM(
|
527
|
+
return Value::ENUM(reinterpret_cast<uint16_t *>(data)[index], type);
|
529
528
|
case PhysicalType::UINT32:
|
530
|
-
return Value::ENUM(
|
529
|
+
return Value::ENUM(reinterpret_cast<uint32_t *>(data)[index], type);
|
531
530
|
default:
|
532
531
|
throw InternalException("ENUM can only have unsigned integers as physical types");
|
533
532
|
}
|
534
533
|
}
|
535
534
|
case LogicalTypeId::POINTER:
|
536
|
-
return Value::POINTER(
|
535
|
+
return Value::POINTER(reinterpret_cast<uintptr_t *>(data)[index]);
|
537
536
|
case LogicalTypeId::FLOAT:
|
538
|
-
return Value::FLOAT(
|
537
|
+
return Value::FLOAT(reinterpret_cast<float *>(data)[index]);
|
539
538
|
case LogicalTypeId::DOUBLE:
|
540
|
-
return Value::DOUBLE(
|
539
|
+
return Value::DOUBLE(reinterpret_cast<double *>(data)[index]);
|
541
540
|
case LogicalTypeId::INTERVAL:
|
542
|
-
return Value::INTERVAL(
|
541
|
+
return Value::INTERVAL(reinterpret_cast<interval_t *>(data)[index]);
|
543
542
|
case LogicalTypeId::VARCHAR: {
|
544
|
-
auto str =
|
543
|
+
auto str = reinterpret_cast<string_t *>(data)[index];
|
545
544
|
return Value(str.GetString());
|
546
545
|
}
|
547
546
|
case LogicalTypeId::AGGREGATE_STATE:
|
548
547
|
case LogicalTypeId::BLOB: {
|
549
|
-
auto str =
|
550
|
-
return Value::BLOB((
|
548
|
+
auto str = reinterpret_cast<string_t *>(data)[index];
|
549
|
+
return Value::BLOB(const_data_ptr_cast(str.GetData()), str.GetSize());
|
551
550
|
}
|
552
551
|
case LogicalTypeId::BIT: {
|
553
|
-
auto str =
|
554
|
-
return Value::BIT((
|
552
|
+
auto str = reinterpret_cast<string_t *>(data)[index];
|
553
|
+
return Value::BIT(const_data_ptr_cast(str.GetData()), str.GetSize());
|
555
554
|
}
|
556
555
|
case LogicalTypeId::MAP: {
|
557
|
-
auto offlen =
|
556
|
+
auto offlen = reinterpret_cast<list_entry_t *>(data)[index];
|
558
557
|
auto &child_vec = ListVector::GetEntry(*vector);
|
559
558
|
duckdb::vector<Value> children;
|
560
559
|
for (idx_t i = offlen.offset; i < offlen.offset + offlen.length; i++) {
|
@@ -579,7 +578,7 @@ Value Vector::GetValueInternal(const Vector &v_p, idx_t index_p) {
|
|
579
578
|
return Value::STRUCT(std::move(children));
|
580
579
|
}
|
581
580
|
case LogicalTypeId::LIST: {
|
582
|
-
auto offlen =
|
581
|
+
auto offlen = reinterpret_cast<list_entry_t *>(data)[index];
|
583
582
|
auto &child_vec = ListVector::GetEntry(*vector);
|
584
583
|
duckdb::vector<Value> children;
|
585
584
|
for (idx_t i = offlen.offset; i < offlen.offset + offlen.length; i++) {
|
@@ -639,10 +638,9 @@ string Vector::ToString(idx_t count) const {
|
|
639
638
|
break;
|
640
639
|
case VectorType::FSST_VECTOR: {
|
641
640
|
for (idx_t i = 0; i < count; i++) {
|
642
|
-
string_t compressed_string =
|
641
|
+
string_t compressed_string = reinterpret_cast<string_t *>(data)[i];
|
643
642
|
Value val = FSSTPrimitives::DecompressValue(FSSTVector::GetDecoder(const_cast<Vector &>(*this)),
|
644
|
-
(
|
645
|
-
compressed_string.GetSize());
|
643
|
+
compressed_string.GetData(), compressed_string.GetSize());
|
646
644
|
retval += GetValue(i).ToString() + (i == count - 1 ? "" : ", ");
|
647
645
|
}
|
648
646
|
} break;
|
@@ -896,7 +894,7 @@ void Vector::ToUnifiedFormat(idx_t count, UnifiedVectorFormat &data) {
|
|
896
894
|
void Vector::Sequence(int64_t start, int64_t increment, idx_t count) {
|
897
895
|
this->vector_type = VectorType::SEQUENCE_VECTOR;
|
898
896
|
this->buffer = make_buffer<VectorBuffer>(sizeof(int64_t) * 3);
|
899
|
-
auto data =
|
897
|
+
auto data = reinterpret_cast<int64_t *>(buffer->GetData());
|
900
898
|
data[0] = start;
|
901
899
|
data[1] = increment;
|
902
900
|
data[2] = int64_t(count);
|
@@ -918,7 +916,7 @@ void Vector::Serialize(idx_t count, Serializer &serializer) {
|
|
918
916
|
auto row_idx = vdata.sel->get_index(i);
|
919
917
|
flat_mask.Set(i, vdata.validity.RowIsValid(row_idx));
|
920
918
|
}
|
921
|
-
serializer.WriteData((
|
919
|
+
serializer.WriteData(const_data_ptr_cast(flat_mask.GetData()), flat_mask.ValidityMaskSize(count));
|
922
920
|
}
|
923
921
|
if (TypeIsConstantSize(type.InternalType())) {
|
924
922
|
// constant size type: simple copy
|
@@ -929,11 +927,11 @@ void Vector::Serialize(idx_t count, Serializer &serializer) {
|
|
929
927
|
} else {
|
930
928
|
switch (type.InternalType()) {
|
931
929
|
case PhysicalType::VARCHAR: {
|
932
|
-
auto strings = (
|
930
|
+
auto strings = UnifiedVectorFormat::GetData<string_t>(vdata);
|
933
931
|
for (idx_t i = 0; i < count; i++) {
|
934
932
|
auto idx = vdata.sel->get_index(i);
|
935
933
|
auto source = !vdata.validity.RowIsValid(idx) ? NullValue<string_t>() : strings[idx];
|
936
|
-
serializer.WriteStringLen((
|
934
|
+
serializer.WriteStringLen(const_data_ptr_cast(source.GetData()), source.GetSize());
|
937
935
|
}
|
938
936
|
break;
|
939
937
|
}
|
@@ -951,7 +949,7 @@ void Vector::Serialize(idx_t count, Serializer &serializer) {
|
|
951
949
|
|
952
950
|
// serialize the list entries in a flat array
|
953
951
|
auto data = make_unsafe_uniq_array<list_entry_t>(count);
|
954
|
-
auto source_array = (
|
952
|
+
auto source_array = UnifiedVectorFormat::GetData<list_entry_t>(vdata);
|
955
953
|
for (idx_t i = 0; i < count; i++) {
|
956
954
|
auto idx = vdata.sel->get_index(i);
|
957
955
|
auto source = source_array[idx];
|
@@ -961,7 +959,7 @@ void Vector::Serialize(idx_t count, Serializer &serializer) {
|
|
961
959
|
|
962
960
|
// write the list size
|
963
961
|
serializer.Write<idx_t>(list_size);
|
964
|
-
serializer.WriteData((
|
962
|
+
serializer.WriteData(const_data_ptr_cast(data.get()), count * sizeof(list_entry_t));
|
965
963
|
|
966
964
|
child.Serialize(list_size, serializer);
|
967
965
|
break;
|
@@ -986,7 +984,8 @@ void Vector::FormatSerialize(FormatSerializer &serializer, idx_t count) {
|
|
986
984
|
auto row_idx = vdata.sel->get_index(i);
|
987
985
|
flat_mask.Set(i, vdata.validity.RowIsValid(row_idx));
|
988
986
|
}
|
989
|
-
serializer.WriteProperty("validity", (
|
987
|
+
serializer.WriteProperty("validity", const_data_ptr_cast(flat_mask.GetData()),
|
988
|
+
flat_mask.ValidityMaskSize(count));
|
990
989
|
}
|
991
990
|
if (TypeIsConstantSize(logical_type.InternalType())) {
|
992
991
|
// constant size type: simple copy
|
@@ -997,7 +996,7 @@ void Vector::FormatSerialize(FormatSerializer &serializer, idx_t count) {
|
|
997
996
|
} else {
|
998
997
|
switch (logical_type.InternalType()) {
|
999
998
|
case PhysicalType::VARCHAR: {
|
1000
|
-
auto strings = (
|
999
|
+
auto strings = UnifiedVectorFormat::GetData<string_t>(vdata);
|
1001
1000
|
|
1002
1001
|
// Serialize data as a list
|
1003
1002
|
serializer.SetTag("data");
|
@@ -1031,7 +1030,7 @@ void Vector::FormatSerialize(FormatSerializer &serializer, idx_t count) {
|
|
1031
1030
|
|
1032
1031
|
// serialize the list entries in a flat array
|
1033
1032
|
auto entries = make_unsafe_uniq_array<list_entry_t>(count);
|
1034
|
-
auto source_array = (
|
1033
|
+
auto source_array = UnifiedVectorFormat::GetData<list_entry_t>(vdata);
|
1035
1034
|
for (idx_t i = 0; i < count; i++) {
|
1036
1035
|
auto idx = vdata.sel->get_index(i);
|
1037
1036
|
auto source = source_array[idx];
|
@@ -1068,7 +1067,7 @@ void Vector::FormatDeserialize(FormatDeserializer &deserializer, idx_t count) {
|
|
1068
1067
|
const auto has_validity = deserializer.ReadProperty<bool>("all_valid");
|
1069
1068
|
if (has_validity) {
|
1070
1069
|
validity.Initialize(count);
|
1071
|
-
deserializer.ReadProperty("validity", (
|
1070
|
+
deserializer.ReadProperty("validity", data_ptr_cast(validity.GetData()), validity.ValidityMaskSize(count));
|
1072
1071
|
}
|
1073
1072
|
|
1074
1073
|
if (TypeIsConstantSize(logical_type.InternalType())) {
|
@@ -1155,7 +1154,7 @@ void Vector::Deserialize(idx_t count, Deserializer &source) {
|
|
1155
1154
|
const auto has_validity = source.Read<bool>();
|
1156
1155
|
if (has_validity) {
|
1157
1156
|
validity.Initialize(count);
|
1158
|
-
source.ReadData((
|
1157
|
+
source.ReadData(data_ptr_cast(validity.GetData()), validity.ValidityMaskSize(count));
|
1159
1158
|
}
|
1160
1159
|
|
1161
1160
|
if (TypeIsConstantSize(type.InternalType())) {
|
@@ -1506,7 +1505,7 @@ void ConstantVector::Reference(Vector &vector, Vector &source, idx_t position, i
|
|
1506
1505
|
break;
|
1507
1506
|
}
|
1508
1507
|
|
1509
|
-
auto list_data = (
|
1508
|
+
auto list_data = UnifiedVectorFormat::GetData<list_entry_t>(vdata);
|
1510
1509
|
auto list_entry = list_data[list_index];
|
1511
1510
|
|
1512
1511
|
// add the list entry as the first element of "vector"
|
@@ -1583,7 +1582,7 @@ string_t StringVector::AddString(Vector &vector, string_t data) {
|
|
1583
1582
|
vector.auxiliary = make_buffer<VectorStringBuffer>();
|
1584
1583
|
}
|
1585
1584
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::STRING_BUFFER);
|
1586
|
-
auto &string_buffer =
|
1585
|
+
auto &string_buffer = vector.auxiliary->Cast<VectorStringBuffer>();
|
1587
1586
|
return string_buffer.AddString(data);
|
1588
1587
|
}
|
1589
1588
|
|
@@ -1597,7 +1596,7 @@ string_t StringVector::AddStringOrBlob(Vector &vector, string_t data) {
|
|
1597
1596
|
vector.auxiliary = make_buffer<VectorStringBuffer>();
|
1598
1597
|
}
|
1599
1598
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::STRING_BUFFER);
|
1600
|
-
auto &string_buffer =
|
1599
|
+
auto &string_buffer = vector.auxiliary->Cast<VectorStringBuffer>();
|
1601
1600
|
return string_buffer.AddBlob(data);
|
1602
1601
|
}
|
1603
1602
|
|
@@ -1610,7 +1609,7 @@ string_t StringVector::EmptyString(Vector &vector, idx_t len) {
|
|
1610
1609
|
vector.auxiliary = make_buffer<VectorStringBuffer>();
|
1611
1610
|
}
|
1612
1611
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::STRING_BUFFER);
|
1613
|
-
auto &string_buffer =
|
1612
|
+
auto &string_buffer = vector.auxiliary->Cast<VectorStringBuffer>();
|
1614
1613
|
return string_buffer.EmptyString(len);
|
1615
1614
|
}
|
1616
1615
|
|
@@ -1619,7 +1618,7 @@ void StringVector::AddHandle(Vector &vector, BufferHandle handle) {
|
|
1619
1618
|
if (!vector.auxiliary) {
|
1620
1619
|
vector.auxiliary = make_buffer<VectorStringBuffer>();
|
1621
1620
|
}
|
1622
|
-
auto &string_buffer =
|
1621
|
+
auto &string_buffer = vector.auxiliary->Cast<VectorStringBuffer>();
|
1623
1622
|
string_buffer.AddHeapReference(make_buffer<ManagedVectorBuffer>(std::move(handle)));
|
1624
1623
|
}
|
1625
1624
|
|
@@ -1629,7 +1628,7 @@ void StringVector::AddBuffer(Vector &vector, buffer_ptr<VectorBuffer> buffer) {
|
|
1629
1628
|
if (!vector.auxiliary) {
|
1630
1629
|
vector.auxiliary = make_buffer<VectorStringBuffer>();
|
1631
1630
|
}
|
1632
|
-
auto &string_buffer =
|
1631
|
+
auto &string_buffer = vector.auxiliary->Cast<VectorStringBuffer>();
|
1633
1632
|
string_buffer.AddHeapReference(std::move(buffer));
|
1634
1633
|
}
|
1635
1634
|
|
@@ -1664,7 +1663,7 @@ string_t FSSTVector::AddCompressedString(Vector &vector, string_t data) {
|
|
1664
1663
|
vector.auxiliary = make_buffer<VectorFSSTStringBuffer>();
|
1665
1664
|
}
|
1666
1665
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::FSST_BUFFER);
|
1667
|
-
auto &fsst_string_buffer =
|
1666
|
+
auto &fsst_string_buffer = vector.auxiliary->Cast<VectorFSSTStringBuffer>();
|
1668
1667
|
return fsst_string_buffer.AddBlob(data);
|
1669
1668
|
}
|
1670
1669
|
|
@@ -1674,8 +1673,8 @@ void *FSSTVector::GetDecoder(const Vector &vector) {
|
|
1674
1673
|
throw InternalException("GetDecoder called on FSST Vector without registered buffer");
|
1675
1674
|
}
|
1676
1675
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::FSST_BUFFER);
|
1677
|
-
auto &fsst_string_buffer =
|
1678
|
-
return
|
1676
|
+
auto &fsst_string_buffer = vector.auxiliary->Cast<VectorFSSTStringBuffer>();
|
1677
|
+
return fsst_string_buffer.GetDecoder();
|
1679
1678
|
}
|
1680
1679
|
|
1681
1680
|
void FSSTVector::RegisterDecoder(Vector &vector, buffer_ptr<void> &duckdb_fsst_decoder) {
|
@@ -1686,7 +1685,7 @@ void FSSTVector::RegisterDecoder(Vector &vector, buffer_ptr<void> &duckdb_fsst_d
|
|
1686
1685
|
}
|
1687
1686
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::FSST_BUFFER);
|
1688
1687
|
|
1689
|
-
auto &fsst_string_buffer =
|
1688
|
+
auto &fsst_string_buffer = vector.auxiliary->Cast<VectorFSSTStringBuffer>();
|
1690
1689
|
fsst_string_buffer.AddDecoder(duckdb_fsst_decoder);
|
1691
1690
|
}
|
1692
1691
|
|
@@ -1698,7 +1697,7 @@ void FSSTVector::SetCount(Vector &vector, idx_t count) {
|
|
1698
1697
|
}
|
1699
1698
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::FSST_BUFFER);
|
1700
1699
|
|
1701
|
-
auto &fsst_string_buffer =
|
1700
|
+
auto &fsst_string_buffer = vector.auxiliary->Cast<VectorFSSTStringBuffer>();
|
1702
1701
|
fsst_string_buffer.SetCount(count);
|
1703
1702
|
}
|
1704
1703
|
|
@@ -1710,7 +1709,7 @@ idx_t FSSTVector::GetCount(Vector &vector) {
|
|
1710
1709
|
}
|
1711
1710
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::FSST_BUFFER);
|
1712
1711
|
|
1713
|
-
auto &fsst_string_buffer =
|
1712
|
+
auto &fsst_string_buffer = vector.auxiliary->Cast<VectorFSSTStringBuffer>();
|
1714
1713
|
return fsst_string_buffer.GetCount();
|
1715
1714
|
}
|
1716
1715
|
|
@@ -1726,9 +1725,8 @@ void FSSTVector::DecompressVector(const Vector &src, Vector &dst, idx_t src_offs
|
|
1726
1725
|
auto target_idx = dst_offset + i;
|
1727
1726
|
string_t compressed_string = ldata[source_idx];
|
1728
1727
|
if (dst_mask.RowIsValid(target_idx) && compressed_string.GetSize() > 0) {
|
1729
|
-
tdata[target_idx] = FSSTPrimitives::DecompressValue(
|
1730
|
-
|
1731
|
-
compressed_string.GetSize());
|
1728
|
+
tdata[target_idx] = FSSTPrimitives::DecompressValue(
|
1729
|
+
FSSTVector::GetDecoder(src), dst, compressed_string.GetData(), compressed_string.GetSize());
|
1732
1730
|
} else {
|
1733
1731
|
tdata[target_idx] = string_t(nullptr, 0);
|
1734
1732
|
}
|
@@ -1827,7 +1825,7 @@ vector<unique_ptr<Vector>> &StructVector::GetEntries(Vector &vector) {
|
|
1827
1825
|
vector.GetVectorType() == VectorType::CONSTANT_VECTOR);
|
1828
1826
|
D_ASSERT(vector.auxiliary);
|
1829
1827
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::STRUCT_BUFFER);
|
1830
|
-
return
|
1828
|
+
return vector.auxiliary->Cast<VectorStructBuffer>().GetChildren();
|
1831
1829
|
}
|
1832
1830
|
|
1833
1831
|
const vector<unique_ptr<Vector>> &StructVector::GetEntries(const Vector &vector) {
|
@@ -1847,7 +1845,7 @@ const Vector &ListVector::GetEntry(const Vector &vector) {
|
|
1847
1845
|
vector.GetVectorType() == VectorType::CONSTANT_VECTOR);
|
1848
1846
|
D_ASSERT(vector.auxiliary);
|
1849
1847
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::LIST_BUFFER);
|
1850
|
-
return
|
1848
|
+
return vector.auxiliary->Cast<VectorListBuffer>().GetChild();
|
1851
1849
|
}
|
1852
1850
|
|
1853
1851
|
Vector &ListVector::GetEntry(Vector &vector) {
|
@@ -1861,7 +1859,7 @@ void ListVector::Reserve(Vector &vector, idx_t required_capacity) {
|
|
1861
1859
|
vector.GetVectorType() == VectorType::CONSTANT_VECTOR);
|
1862
1860
|
D_ASSERT(vector.auxiliary);
|
1863
1861
|
D_ASSERT(vector.auxiliary->GetBufferType() == VectorBufferType::LIST_BUFFER);
|
1864
|
-
auto &child_buffer =
|
1862
|
+
auto &child_buffer = vector.auxiliary->Cast<VectorListBuffer>();
|
1865
1863
|
child_buffer.Reserve(required_capacity);
|
1866
1864
|
}
|
1867
1865
|
|
@@ -1871,7 +1869,7 @@ idx_t ListVector::GetListSize(const Vector &vec) {
|
|
1871
1869
|
return ListVector::GetListSize(child);
|
1872
1870
|
}
|
1873
1871
|
D_ASSERT(vec.auxiliary);
|
1874
|
-
return
|
1872
|
+
return vec.auxiliary->Cast<VectorListBuffer>().GetSize();
|
1875
1873
|
}
|
1876
1874
|
|
1877
1875
|
idx_t ListVector::GetListCapacity(const Vector &vec) {
|
@@ -1880,7 +1878,7 @@ idx_t ListVector::GetListCapacity(const Vector &vec) {
|
|
1880
1878
|
return ListVector::GetListSize(child);
|
1881
1879
|
}
|
1882
1880
|
D_ASSERT(vec.auxiliary);
|
1883
|
-
return
|
1881
|
+
return vec.auxiliary->Cast<VectorListBuffer>().GetCapacity();
|
1884
1882
|
}
|
1885
1883
|
|
1886
1884
|
void ListVector::ReferenceEntry(Vector &vector, Vector &other) {
|
@@ -1897,7 +1895,7 @@ void ListVector::SetListSize(Vector &vec, idx_t size) {
|
|
1897
1895
|
auto &child = DictionaryVector::Child(vec);
|
1898
1896
|
ListVector::SetListSize(child, size);
|
1899
1897
|
}
|
1900
|
-
|
1898
|
+
vec.auxiliary->Cast<VectorListBuffer>().SetSize(size);
|
1901
1899
|
}
|
1902
1900
|
|
1903
1901
|
void ListVector::Append(Vector &target, const Vector &source, idx_t source_size, idx_t source_offset) {
|
@@ -1905,7 +1903,7 @@ void ListVector::Append(Vector &target, const Vector &source, idx_t source_size,
|
|
1905
1903
|
//! Nothing to add
|
1906
1904
|
return;
|
1907
1905
|
}
|
1908
|
-
auto &target_buffer =
|
1906
|
+
auto &target_buffer = target.auxiliary->Cast<VectorListBuffer>();
|
1909
1907
|
target_buffer.Append(source, source_size, source_offset);
|
1910
1908
|
}
|
1911
1909
|
|
@@ -1915,12 +1913,12 @@ void ListVector::Append(Vector &target, const Vector &source, const SelectionVec
|
|
1915
1913
|
//! Nothing to add
|
1916
1914
|
return;
|
1917
1915
|
}
|
1918
|
-
auto &target_buffer =
|
1916
|
+
auto &target_buffer = target.auxiliary->Cast<VectorListBuffer>();
|
1919
1917
|
target_buffer.Append(source, sel, source_size, source_offset);
|
1920
1918
|
}
|
1921
1919
|
|
1922
1920
|
void ListVector::PushBack(Vector &target, const Value &insert) {
|
1923
|
-
auto &target_buffer =
|
1921
|
+
auto &target_buffer = target.auxiliary->Cast<VectorListBuffer>();
|
1924
1922
|
target_buffer.PushBack(insert);
|
1925
1923
|
}
|
1926
1924
|
|
@@ -1942,7 +1940,7 @@ ConsecutiveChildListInfo ListVector::GetConsecutiveChildListInfo(Vector &list, i
|
|
1942
1940
|
ConsecutiveChildListInfo info;
|
1943
1941
|
UnifiedVectorFormat unified_list_data;
|
1944
1942
|
list.ToUnifiedFormat(offset + count, unified_list_data);
|
1945
|
-
auto list_data = (
|
1943
|
+
auto list_data = UnifiedVectorFormat::GetData<list_entry_t>(unified_list_data);
|
1946
1944
|
|
1947
1945
|
// find the first non-NULL entry
|
1948
1946
|
idx_t first_length = 0;
|
@@ -1992,10 +1990,9 @@ ConsecutiveChildListInfo ListVector::GetConsecutiveChildListInfo(Vector &list, i
|
|
1992
1990
|
}
|
1993
1991
|
|
1994
1992
|
void ListVector::GetConsecutiveChildSelVector(Vector &list, SelectionVector &sel, idx_t offset, idx_t count) {
|
1995
|
-
|
1996
1993
|
UnifiedVectorFormat unified_list_data;
|
1997
1994
|
list.ToUnifiedFormat(offset + count, unified_list_data);
|
1998
|
-
auto list_data = (
|
1995
|
+
auto list_data = UnifiedVectorFormat::GetData<list_entry_t>(unified_list_data);
|
1999
1996
|
|
2000
1997
|
// SelectionVector child_sel(info.second.length);
|
2001
1998
|
idx_t entry = 0;
|
@@ -2130,7 +2127,7 @@ UnionInvalidReason UnionVector::CheckUnionValidity(Vector &vector, idx_t count,
|
|
2130
2127
|
continue;
|
2131
2128
|
}
|
2132
2129
|
|
2133
|
-
auto tag = ((
|
2130
|
+
auto tag = (UnifiedVectorFormat::GetData<union_tag_t>(tags_vdata))[tag_mapped_row_idx];
|
2134
2131
|
if (tag >= member_count) {
|
2135
2132
|
return UnionInvalidReason::TAG_OUT_OF_RANGE;
|
2136
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
|
|