duckdb 0.8.2-dev4142.0 → 0.8.2-dev4314.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 +0 -2
- package/lib/duckdb.js +3 -3
- package/package.json +1 -1
- package/src/connection.cpp +9 -8
- package/src/database.cpp +5 -8
- package/src/duckdb/extension/icu/icu-datepart.cpp +2 -2
- package/src/duckdb/extension/icu/icu-strptime.cpp +0 -9
- package/src/duckdb/extension/icu/icu_extension.cpp +3 -3
- package/src/duckdb/extension/icu/third_party/icu/i18n/unicode/gregocal.h +1 -1
- package/src/duckdb/extension/json/buffered_json_reader.cpp +3 -17
- package/src/duckdb/extension/json/include/buffered_json_reader.hpp +2 -5
- package/src/duckdb/extension/json/include/json_deserializer.hpp +2 -2
- package/src/duckdb/extension/json/include/json_scan.hpp +5 -12
- package/src/duckdb/extension/json/include/json_serializer.hpp +3 -3
- package/src/duckdb/extension/json/include/json_transform.hpp +2 -5
- package/src/duckdb/extension/json/json_functions/json_serialize_sql.cpp +1 -1
- package/src/duckdb/extension/json/json_functions/json_transform.cpp +2 -18
- package/src/duckdb/extension/json/json_scan.cpp +7 -76
- package/src/duckdb/extension/json/serialize_json.cpp +8 -8
- package/src/duckdb/extension/parquet/column_writer.cpp +46 -45
- package/src/duckdb/extension/parquet/include/column_writer.hpp +2 -2
- package/src/duckdb/extension/parquet/include/parquet_reader.hpp +2 -5
- package/src/duckdb/extension/parquet/include/parquet_rle_bp_encoder.hpp +4 -4
- package/src/duckdb/extension/parquet/parquet_extension.cpp +74 -55
- package/src/duckdb/extension/parquet/parquet_writer.cpp +3 -2
- package/src/duckdb/extension/parquet/serialize_parquet.cpp +4 -4
- package/src/duckdb/src/catalog/catalog_entry/index_catalog_entry.cpp +0 -1
- package/src/duckdb/src/catalog/catalog_entry/macro_catalog_entry.cpp +0 -1
- package/src/duckdb/src/catalog/catalog_entry/schema_catalog_entry.cpp +0 -1
- package/src/duckdb/src/catalog/catalog_entry/sequence_catalog_entry.cpp +0 -1
- package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +0 -2
- package/src/duckdb/src/catalog/catalog_entry/type_catalog_entry.cpp +1 -3
- package/src/duckdb/src/catalog/catalog_entry/view_catalog_entry.cpp +0 -1
- package/src/duckdb/src/catalog/catalog_entry.cpp +2 -11
- package/src/duckdb/src/catalog/catalog_set.cpp +16 -14
- package/src/duckdb/src/catalog/default/default_functions.cpp +2 -2
- package/src/duckdb/src/common/arrow/arrow_converter.cpp +0 -1
- package/src/duckdb/src/common/constants.cpp +0 -1
- package/src/duckdb/src/common/enum_util.cpp +0 -10
- package/src/duckdb/src/common/exception.cpp +1 -1
- package/src/duckdb/src/common/extra_type_info.cpp +20 -192
- package/src/duckdb/src/common/multi_file_reader.cpp +0 -68
- package/src/duckdb/src/common/serializer/binary_serializer.cpp +9 -4
- package/src/duckdb/src/common/serializer/buffered_file_reader.cpp +3 -11
- package/src/duckdb/src/common/serializer/buffered_file_writer.cpp +1 -1
- package/src/duckdb/src/common/serializer/memory_stream.cpp +61 -0
- package/src/duckdb/src/common/serializer/{format_serializer.cpp → serializer.cpp} +2 -2
- package/src/duckdb/src/common/sort/partition_state.cpp +107 -29
- package/src/duckdb/src/common/types/column/column_data_collection.cpp +4 -4
- package/src/duckdb/src/common/types/data_chunk.cpp +11 -43
- package/src/duckdb/src/common/types/hyperloglog.cpp +4 -23
- package/src/duckdb/src/common/types/interval.cpp +2 -2
- package/src/duckdb/src/common/types/value.cpp +10 -135
- package/src/duckdb/src/common/types/vector.cpp +17 -149
- package/src/duckdb/src/common/types.cpp +2 -20
- package/src/duckdb/src/core_functions/aggregate/algebraic/avg.cpp +0 -1
- package/src/duckdb/src/core_functions/aggregate/distributive/string_agg.cpp +6 -7
- package/src/duckdb/src/core_functions/aggregate/holistic/approximate_quantile.cpp +5 -28
- package/src/duckdb/src/core_functions/aggregate/holistic/quantile.cpp +30 -78
- package/src/duckdb/src/core_functions/aggregate/holistic/reservoir_quantile.cpp +5 -30
- package/src/duckdb/src/core_functions/scalar/date/date_part.cpp +6 -9
- package/src/duckdb/src/core_functions/scalar/list/list_aggregates.cpp +21 -16
- package/src/duckdb/src/core_functions/scalar/list/list_lambdas.cpp +15 -23
- package/src/duckdb/src/execution/index/art/art.cpp +5 -1
- package/src/duckdb/src/execution/index/art/leaf.cpp +13 -10
- package/src/duckdb/src/execution/index/art/node48.cpp +0 -2
- package/src/duckdb/src/execution/index/fixed_size_allocator.cpp +38 -73
- package/src/duckdb/src/execution/index/fixed_size_buffer.cpp +245 -27
- package/src/duckdb/src/execution/operator/aggregate/physical_window.cpp +2 -3
- package/src/duckdb/src/execution/operator/join/physical_asof_join.cpp +35 -20
- package/src/duckdb/src/function/macro_function.cpp +0 -42
- package/src/duckdb/src/function/scalar/compressed_materialization/compress_integral.cpp +10 -8
- package/src/duckdb/src/function/scalar/compressed_materialization/compress_string.cpp +13 -12
- package/src/duckdb/src/function/scalar/operators/arithmetic.cpp +9 -11
- package/src/duckdb/src/function/scalar/system/aggregate_export.cpp +7 -33
- package/src/duckdb/src/function/scalar_function.cpp +1 -2
- package/src/duckdb/src/function/scalar_macro_function.cpp +0 -10
- package/src/duckdb/src/function/table/copy_csv.cpp +38 -38
- package/src/duckdb/src/function/table/read_csv.cpp +5 -174
- package/src/duckdb/src/function/table/table_scan.cpp +5 -42
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/function/table_function.cpp +3 -4
- package/src/duckdb/src/function/table_macro_function.cpp +0 -10
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/schema_catalog_entry.hpp +0 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/sequence_catalog_entry.hpp +0 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/type_catalog_entry.hpp +0 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry.hpp +3 -8
- package/src/duckdb/src/include/duckdb/common/constants.hpp +4 -2
- package/src/duckdb/src/include/duckdb/common/extra_type_info.hpp +16 -46
- package/src/duckdb/src/include/duckdb/common/index_vector.hpp +4 -4
- package/src/duckdb/src/include/duckdb/common/multi_file_reader.hpp +2 -6
- package/src/duckdb/src/include/duckdb/common/multi_file_reader_options.hpp +0 -4
- package/src/duckdb/src/include/duckdb/common/serializer/binary_deserializer.hpp +44 -23
- package/src/duckdb/src/include/duckdb/common/serializer/binary_serializer.hpp +31 -23
- package/src/duckdb/src/include/duckdb/common/serializer/buffered_file_reader.hpp +4 -6
- package/src/duckdb/src/include/duckdb/common/serializer/buffered_file_writer.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/serializer/deserialization_data.hpp +17 -0
- package/src/duckdb/src/include/duckdb/common/serializer/{format_deserializer.hpp → deserializer.hpp} +13 -13
- package/src/duckdb/src/include/duckdb/common/serializer/memory_stream.hpp +62 -0
- package/src/duckdb/src/include/duckdb/common/serializer/read_stream.hpp +38 -0
- package/src/duckdb/src/include/duckdb/common/serializer/serialization_traits.hpp +15 -13
- package/src/duckdb/src/include/duckdb/common/serializer/{format_serializer.hpp → serializer.hpp} +13 -12
- package/src/duckdb/src/include/duckdb/common/serializer/write_stream.hpp +36 -0
- package/src/duckdb/src/include/duckdb/common/sort/partition_state.hpp +14 -4
- package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/types/data_chunk.hpp +3 -8
- package/src/duckdb/src/include/duckdb/common/types/hyperloglog.hpp +4 -10
- package/src/duckdb/src/include/duckdb/common/types/interval.hpp +4 -4
- package/src/duckdb/src/include/duckdb/common/types/value.hpp +1 -5
- package/src/duckdb/src/include/duckdb/common/types/vector.hpp +2 -7
- package/src/duckdb/src/include/duckdb/common/types.hpp +1 -10
- package/src/duckdb/src/include/duckdb/execution/index/art/leaf.hpp +2 -0
- package/src/duckdb/src/include/duckdb/execution/index/fixed_size_allocator.hpp +1 -7
- package/src/duckdb/src/include/duckdb/execution/index/fixed_size_buffer.hpp +38 -8
- package/src/duckdb/src/include/duckdb/execution/operator/scan/csv/csv_reader_options.hpp +2 -11
- package/src/duckdb/src/include/duckdb/function/aggregate_function.hpp +4 -14
- package/src/duckdb/src/include/duckdb/function/copy_function.hpp +3 -3
- package/src/duckdb/src/include/duckdb/function/function_serialization.hpp +15 -98
- package/src/duckdb/src/include/duckdb/function/macro_function.hpp +1 -7
- package/src/duckdb/src/include/duckdb/function/scalar/nested_functions.hpp +9 -10
- package/src/duckdb/src/include/duckdb/function/scalar/strftime_format.hpp +2 -2
- package/src/duckdb/src/include/duckdb/function/scalar_function.hpp +2 -12
- package/src/duckdb/src/include/duckdb/function/scalar_macro_function.hpp +2 -7
- package/src/duckdb/src/include/duckdb/function/table/read_csv.hpp +4 -16
- package/src/duckdb/src/include/duckdb/function/table_function.hpp +2 -11
- package/src/duckdb/src/include/duckdb/function/table_macro_function.hpp +2 -7
- package/src/duckdb/src/include/duckdb/main/relation.hpp +9 -2
- package/src/duckdb/src/include/duckdb/parser/column_definition.hpp +1 -4
- package/src/duckdb/src/include/duckdb/parser/column_list.hpp +2 -6
- package/src/duckdb/src/include/duckdb/parser/common_table_expression_info.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/constraint.hpp +2 -12
- package/src/duckdb/src/include/duckdb/parser/constraints/check_constraint.hpp +2 -5
- package/src/duckdb/src/include/duckdb/parser/constraints/foreign_key_constraint.hpp +2 -7
- package/src/duckdb/src/include/duckdb/parser/constraints/not_null_constraint.hpp +2 -7
- package/src/duckdb/src/include/duckdb/parser/constraints/unique_constraint.hpp +2 -7
- package/src/duckdb/src/include/duckdb/parser/expression/between_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/parser/expression/bound_expression.hpp +1 -4
- package/src/duckdb/src/include/duckdb/parser/expression/case_expression.hpp +4 -6
- package/src/duckdb/src/include/duckdb/parser/expression/cast_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/collate_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/columnref_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/comparison_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/conjunction_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/constant_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/parser/expression/default_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/function_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/lambda_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/operator_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/parameter_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/positional_reference_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/star_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/subquery_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/expression/window_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_info.hpp +2 -5
- package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_scalar_function_info.hpp +0 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_table_function_info.hpp +0 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_table_info.hpp +24 -51
- package/src/duckdb/src/include/duckdb/parser/parsed_data/attach_info.hpp +1 -4
- package/src/duckdb/src/include/duckdb/parser/parsed_data/copy_info.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_collation_info.hpp +0 -3
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_copy_function_info.hpp +0 -3
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_function_info.hpp +0 -5
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_index_info.hpp +2 -7
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_info.hpp +1 -13
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_macro_info.hpp +2 -8
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_schema_info.hpp +2 -12
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_sequence_info.hpp +2 -7
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_table_info.hpp +2 -7
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_type_info.hpp +2 -7
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_view_info.hpp +2 -7
- package/src/duckdb/src/include/duckdb/parser/parsed_data/detach_info.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/parsed_data/drop_info.hpp +2 -5
- package/src/duckdb/src/include/duckdb/parser/parsed_data/load_info.hpp +2 -21
- package/src/duckdb/src/include/duckdb/parser/parsed_data/parse_info.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_data/pragma_info.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_data/sample_options.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/parsed_data/transaction_info.hpp +1 -4
- package/src/duckdb/src/include/duckdb/parser/parsed_data/vacuum_info.hpp +5 -7
- package/src/duckdb/src/include/duckdb/parser/parsed_expression.hpp +3 -16
- package/src/duckdb/src/include/duckdb/parser/query_node/cte_node.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/query_node/recursive_cte_node.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/query_node/select_node.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/query_node/set_operation_node.hpp +2 -4
- package/src/duckdb/src/include/duckdb/parser/query_node.hpp +7 -14
- package/src/duckdb/src/include/duckdb/parser/result_modifier.hpp +14 -32
- package/src/duckdb/src/include/duckdb/parser/statement/select_statement.hpp +4 -9
- package/src/duckdb/src/include/duckdb/parser/tableref/basetableref.hpp +2 -6
- package/src/duckdb/src/include/duckdb/parser/tableref/emptytableref.hpp +2 -6
- package/src/duckdb/src/include/duckdb/parser/tableref/expressionlistref.hpp +2 -6
- package/src/duckdb/src/include/duckdb/parser/tableref/joinref.hpp +2 -6
- package/src/duckdb/src/include/duckdb/parser/tableref/pivotref.hpp +6 -14
- package/src/duckdb/src/include/duckdb/parser/tableref/subqueryref.hpp +2 -6
- package/src/duckdb/src/include/duckdb/parser/tableref/table_function_ref.hpp +2 -6
- package/src/duckdb/src/include/duckdb/parser/tableref.hpp +2 -10
- package/src/duckdb/src/include/duckdb/parser/transformer.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/bound_constraint.hpp +0 -1
- package/src/duckdb/src/include/duckdb/planner/bound_result_modifier.hpp +2 -8
- package/src/duckdb/src/include/duckdb/planner/column_binding.hpp +4 -4
- package/src/duckdb/src/include/duckdb/planner/expression/bound_aggregate_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/expression/bound_between_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/expression/bound_case_expression.hpp +3 -9
- package/src/duckdb/src/include/duckdb/planner/expression/bound_cast_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/expression/bound_columnref_expression.hpp +2 -8
- package/src/duckdb/src/include/duckdb/planner/expression/bound_comparison_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/expression/bound_conjunction_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/expression/bound_constant_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/expression/bound_default_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/expression/bound_function_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/expression/bound_lambda_expression.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/expression/bound_lambdaref_expression.hpp +2 -8
- package/src/duckdb/src/include/duckdb/planner/expression/bound_operator_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/expression/bound_parameter_data.hpp +2 -19
- package/src/duckdb/src/include/duckdb/planner/expression/bound_parameter_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/expression/bound_reference_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/expression/bound_subquery_expression.hpp +0 -3
- package/src/duckdb/src/include/duckdb/planner/expression/bound_unnest_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/expression/bound_window_expression.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/expression.hpp +2 -14
- package/src/duckdb/src/include/duckdb/planner/filter/conjunction_filter.hpp +4 -8
- package/src/duckdb/src/include/duckdb/planner/filter/constant_filter.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/filter/null_filter.hpp +4 -8
- package/src/duckdb/src/include/duckdb/planner/joinside.hpp +1 -6
- package/src/duckdb/src/include/duckdb/planner/logical_operator.hpp +2 -17
- package/src/duckdb/src/include/duckdb/planner/operator/logical_aggregate.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_any_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_column_data_get.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_comparison_join.hpp +2 -6
- package/src/duckdb/src/include/duckdb/planner/operator/logical_copy_to_file.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create_index.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create_table.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_cross_product.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_cteref.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delete.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delim_get.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_dependent_join.hpp +0 -1
- package/src/duckdb/src/include/duckdb/planner/operator/logical_distinct.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_dummy_scan.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_empty_result.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_execute.hpp +0 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_explain.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_export.hpp +0 -3
- package/src/duckdb/src/include/duckdb/planner/operator/logical_expression_get.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_extension_operator.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_filter.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_get.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_insert.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_join.hpp +0 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_limit.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_limit_percent.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_materialized_cte.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_order.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pivot.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_positional_join.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pragma.hpp +0 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_prepare.hpp +0 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_projection.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_recursive_cte.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_reset.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_sample.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_set.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_set_operation.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_show.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_simple.hpp +2 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_top_n.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_unnest.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_update.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator/logical_window.hpp +2 -4
- package/src/duckdb/src/include/duckdb/planner/operator_extension.hpp +1 -3
- package/src/duckdb/src/include/duckdb/planner/parsed_data/bound_create_table_info.hpp +0 -5
- package/src/duckdb/src/include/duckdb/planner/table_filter.hpp +3 -12
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_pivotref.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/block.hpp +7 -4
- package/src/duckdb/src/include/duckdb/storage/checkpoint/row_group_writer.hpp +3 -2
- package/src/duckdb/src/include/duckdb/storage/checkpoint/table_data_writer.hpp +6 -6
- package/src/duckdb/src/include/duckdb/storage/checkpoint_manager.hpp +18 -18
- package/src/duckdb/src/include/duckdb/storage/data_pointer.hpp +6 -0
- package/src/duckdb/src/include/duckdb/storage/data_table.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/metadata/metadata_manager.hpp +4 -5
- package/src/duckdb/src/include/duckdb/storage/metadata/metadata_reader.hpp +2 -1
- package/src/duckdb/src/include/duckdb/storage/metadata/metadata_writer.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/partial_block_manager.hpp +35 -19
- package/src/duckdb/src/include/duckdb/storage/statistics/base_statistics.hpp +2 -11
- package/src/duckdb/src/include/duckdb/storage/statistics/column_statistics.hpp +3 -5
- package/src/duckdb/src/include/duckdb/storage/statistics/distinct_statistics.hpp +3 -11
- package/src/duckdb/src/include/duckdb/storage/statistics/list_stats.hpp +2 -7
- package/src/duckdb/src/include/duckdb/storage/statistics/node_statistics.hpp +0 -26
- package/src/duckdb/src/include/duckdb/storage/statistics/numeric_stats.hpp +2 -7
- package/src/duckdb/src/include/duckdb/storage/statistics/string_stats.hpp +2 -7
- package/src/duckdb/src/include/duckdb/storage/statistics/struct_stats.hpp +2 -7
- package/src/duckdb/src/include/duckdb/storage/storage_info.hpp +4 -6
- package/src/duckdb/src/include/duckdb/storage/table/chunk_info.hpp +8 -17
- package/src/duckdb/src/include/duckdb/storage/table/column_checkpoint_state.hpp +5 -20
- package/src/duckdb/src/include/duckdb/storage/table/column_data.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/table/list_column_data.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/row_group.hpp +2 -7
- package/src/duckdb/src/include/duckdb/storage/table/standard_column_data.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/table/table_statistics.hpp +4 -7
- package/src/duckdb/src/include/duckdb/storage/write_ahead_log.hpp +27 -29
- package/src/duckdb/src/include/duckdb/verification/statement_verifier.hpp +0 -2
- package/src/duckdb/src/main/client_context.cpp +0 -6
- package/src/duckdb/src/main/client_verify.cpp +0 -2
- package/src/duckdb/src/main/extension/extension_helper.cpp +1 -0
- package/src/duckdb/src/main/relation.cpp +15 -2
- package/src/duckdb/src/parser/column_definition.cpp +0 -25
- package/src/duckdb/src/parser/column_list.cpp +0 -13
- package/src/duckdb/src/parser/constraint.cpp +0 -33
- package/src/duckdb/src/parser/constraints/check_constraint.cpp +0 -11
- package/src/duckdb/src/parser/constraints/foreign_key_constraint.cpp +0 -27
- package/src/duckdb/src/parser/constraints/not_null_constraint.cpp +0 -11
- package/src/duckdb/src/parser/constraints/unique_constraint.cpp +0 -24
- package/src/duckdb/src/parser/expression/between_expression.cpp +2 -16
- package/src/duckdb/src/parser/expression/case_expression.cpp +2 -29
- package/src/duckdb/src/parser/expression/cast_expression.cpp +2 -16
- package/src/duckdb/src/parser/expression/collate_expression.cpp +2 -14
- package/src/duckdb/src/parser/expression/columnref_expression.cpp +2 -13
- package/src/duckdb/src/parser/expression/comparison_expression.cpp +2 -14
- package/src/duckdb/src/parser/expression/conjunction_expression.cpp +2 -13
- package/src/duckdb/src/parser/expression/constant_expression.cpp +2 -12
- package/src/duckdb/src/parser/expression/default_expression.cpp +2 -9
- package/src/duckdb/src/parser/expression/function_expression.cpp +2 -32
- package/src/duckdb/src/parser/expression/lambda_expression.cpp +2 -14
- package/src/duckdb/src/parser/expression/operator_expression.cpp +2 -13
- package/src/duckdb/src/parser/expression/parameter_expression.cpp +2 -13
- package/src/duckdb/src/parser/expression/positional_reference_expression.cpp +2 -12
- package/src/duckdb/src/parser/expression/star_expression.cpp +2 -43
- package/src/duckdb/src/parser/expression/subquery_expression.cpp +2 -28
- package/src/duckdb/src/parser/expression/window_expression.cpp +2 -53
- package/src/duckdb/src/parser/parsed_data/alter_info.cpp +0 -35
- package/src/duckdb/src/parser/parsed_data/alter_scalar_function_info.cpp +0 -18
- package/src/duckdb/src/parser/parsed_data/alter_table_function_info.cpp +0 -13
- package/src/duckdb/src/parser/parsed_data/alter_table_info.cpp +1 -189
- package/src/duckdb/src/parser/parsed_data/attach_info.cpp +0 -29
- package/src/duckdb/src/parser/parsed_data/create_collation_info.cpp +0 -4
- package/src/duckdb/src/parser/parsed_data/create_copy_function_info.cpp +0 -4
- package/src/duckdb/src/parser/parsed_data/create_index_info.cpp +0 -48
- package/src/duckdb/src/parser/parsed_data/create_info.cpp +0 -47
- package/src/duckdb/src/parser/parsed_data/create_macro_info.cpp +1 -28
- package/src/duckdb/src/parser/parsed_data/create_sequence_info.cpp +0 -31
- package/src/duckdb/src/parser/parsed_data/create_table_info.cpp +0 -23
- package/src/duckdb/src/parser/parsed_data/create_type_info.cpp +0 -22
- package/src/duckdb/src/parser/parsed_data/create_view_info.cpp +0 -23
- package/src/duckdb/src/parser/parsed_data/detach_info.cpp +0 -19
- package/src/duckdb/src/parser/parsed_data/drop_info.cpp +0 -26
- package/src/duckdb/src/parser/parsed_data/sample_options.cpp +2 -25
- package/src/duckdb/src/parser/parsed_data/transaction_info.cpp +0 -16
- package/src/duckdb/src/parser/parsed_data/vacuum_info.cpp +0 -20
- package/src/duckdb/src/parser/parsed_expression.cpp +2 -79
- package/src/duckdb/src/parser/query_node/cte_node.cpp +2 -19
- package/src/duckdb/src/parser/query_node/recursive_cte_node.cpp +2 -21
- package/src/duckdb/src/parser/query_node/select_node.cpp +2 -47
- package/src/duckdb/src/parser/query_node/set_operation_node.cpp +2 -17
- package/src/duckdb/src/parser/query_node.cpp +2 -62
- package/src/duckdb/src/parser/result_modifier.cpp +2 -96
- package/src/duckdb/src/parser/statement/select_statement.cpp +2 -13
- package/src/duckdb/src/parser/tableref/basetableref.cpp +2 -21
- package/src/duckdb/src/parser/tableref/emptytableref.cpp +0 -9
- package/src/duckdb/src/parser/tableref/expressionlistref.cpp +2 -28
- package/src/duckdb/src/parser/tableref/joinref.cpp +2 -23
- package/src/duckdb/src/parser/tableref/pivotref.cpp +0 -61
- package/src/duckdb/src/parser/tableref/subqueryref.cpp +2 -15
- package/src/duckdb/src/parser/tableref/table_function.cpp +2 -17
- package/src/duckdb/src/parser/tableref.cpp +2 -52
- package/src/duckdb/src/planner/binder/expression/bind_subquery_expression.cpp +1 -4
- package/src/duckdb/src/planner/bound_result_modifier.cpp +0 -33
- package/src/duckdb/src/planner/expression/bound_aggregate_expression.cpp +6 -30
- package/src/duckdb/src/planner/expression/bound_between_expression.cpp +0 -19
- package/src/duckdb/src/planner/expression/bound_case_expression.cpp +0 -36
- package/src/duckdb/src/planner/expression/bound_cast_expression.cpp +0 -15
- package/src/duckdb/src/planner/expression/bound_columnref_expression.cpp +0 -20
- package/src/duckdb/src/planner/expression/bound_comparison_expression.cpp +0 -13
- package/src/duckdb/src/planner/expression/bound_conjunction_expression.cpp +0 -13
- package/src/duckdb/src/planner/expression/bound_constant_expression.cpp +0 -11
- package/src/duckdb/src/planner/expression/bound_expression.cpp +1 -5
- package/src/duckdb/src/planner/expression/bound_function_expression.cpp +8 -28
- package/src/duckdb/src/planner/expression/bound_lambda_expression.cpp +0 -4
- package/src/duckdb/src/planner/expression/bound_lambdaref_expression.cpp +0 -23
- package/src/duckdb/src/planner/expression/bound_operator_expression.cpp +0 -16
- package/src/duckdb/src/planner/expression/bound_parameter_expression.cpp +0 -18
- package/src/duckdb/src/planner/expression/bound_reference_expression.cpp +0 -16
- package/src/duckdb/src/planner/expression/bound_subquery_expression.cpp +0 -4
- package/src/duckdb/src/planner/expression/bound_unnest_expression.cpp +0 -15
- package/src/duckdb/src/planner/expression/bound_window_expression.cpp +7 -60
- package/src/duckdb/src/planner/expression.cpp +0 -74
- package/src/duckdb/src/planner/filter/conjunction_filter.cpp +0 -21
- package/src/duckdb/src/planner/filter/constant_filter.cpp +0 -12
- package/src/duckdb/src/planner/filter/null_filter.cpp +0 -14
- package/src/duckdb/src/planner/joinside.cpp +0 -24
- package/src/duckdb/src/planner/logical_operator.cpp +15 -215
- package/src/duckdb/src/planner/operator/logical_aggregate.cpp +0 -46
- package/src/duckdb/src/planner/operator/logical_any_join.cpp +0 -14
- package/src/duckdb/src/planner/operator/logical_column_data_get.cpp +0 -23
- package/src/duckdb/src/planner/operator/logical_comparison_join.cpp +0 -23
- package/src/duckdb/src/planner/operator/logical_copy_to_file.cpp +2 -56
- package/src/duckdb/src/planner/operator/logical_create.cpp +0 -12
- package/src/duckdb/src/planner/operator/logical_create_index.cpp +0 -25
- package/src/duckdb/src/planner/operator/logical_create_table.cpp +0 -10
- package/src/duckdb/src/planner/operator/logical_cross_product.cpp +0 -9
- package/src/duckdb/src/planner/operator/logical_cteref.cpp +0 -18
- package/src/duckdb/src/planner/operator/logical_delete.cpp +0 -22
- package/src/duckdb/src/planner/operator/logical_delim_get.cpp +0 -12
- package/src/duckdb/src/planner/operator/logical_dependent_join.cpp +0 -4
- package/src/duckdb/src/planner/operator/logical_distinct.cpp +0 -16
- package/src/duckdb/src/planner/operator/logical_dummy_scan.cpp +0 -10
- package/src/duckdb/src/planner/operator/logical_empty_result.cpp +0 -15
- package/src/duckdb/src/planner/operator/logical_expression_get.cpp +0 -24
- package/src/duckdb/src/planner/operator/logical_extension_operator.cpp +6 -19
- package/src/duckdb/src/planner/operator/logical_filter.cpp +0 -15
- package/src/duckdb/src/planner/operator/logical_get.cpp +12 -97
- package/src/duckdb/src/planner/operator/logical_insert.cpp +0 -77
- package/src/duckdb/src/planner/operator/logical_join.cpp +0 -17
- package/src/duckdb/src/planner/operator/logical_limit.cpp +0 -16
- package/src/duckdb/src/planner/operator/logical_limit_percent.cpp +0 -16
- package/src/duckdb/src/planner/operator/logical_materialized_cte.cpp +0 -13
- package/src/duckdb/src/planner/operator/logical_order.cpp +0 -15
- package/src/duckdb/src/planner/operator/logical_pivot.cpp +0 -20
- package/src/duckdb/src/planner/operator/logical_positional_join.cpp +0 -10
- package/src/duckdb/src/planner/operator/logical_pragma.cpp +0 -8
- package/src/duckdb/src/planner/operator/logical_prepare.cpp +0 -8
- package/src/duckdb/src/planner/operator/logical_projection.cpp +0 -12
- package/src/duckdb/src/planner/operator/logical_recursive_cte.cpp +0 -15
- package/src/duckdb/src/planner/operator/logical_reset.cpp +0 -12
- package/src/duckdb/src/planner/operator/logical_sample.cpp +0 -11
- package/src/duckdb/src/planner/operator/logical_set.cpp +0 -14
- package/src/duckdb/src/planner/operator/logical_set_operation.cpp +0 -13
- package/src/duckdb/src/planner/operator/logical_simple.cpp +0 -60
- package/src/duckdb/src/planner/operator/logical_top_n.cpp +0 -14
- package/src/duckdb/src/planner/operator/logical_unnest.cpp +0 -14
- package/src/duckdb/src/planner/operator/logical_update.cpp +0 -28
- package/src/duckdb/src/planner/operator/logical_window.cpp +0 -13
- package/src/duckdb/src/planner/planner.cpp +13 -22
- package/src/duckdb/src/planner/table_filter.cpp +0 -59
- package/src/duckdb/src/storage/checkpoint/row_group_writer.cpp +7 -17
- package/src/duckdb/src/storage/checkpoint/table_data_reader.cpp +7 -4
- package/src/duckdb/src/storage/checkpoint/table_data_writer.cpp +24 -22
- package/src/duckdb/src/storage/checkpoint_manager.cpp +203 -180
- package/src/duckdb/src/storage/data_table.cpp +2 -2
- package/src/duckdb/src/storage/metadata/metadata_manager.cpp +11 -9
- package/src/duckdb/src/storage/partial_block_manager.cpp +42 -15
- package/src/duckdb/src/storage/serialization/serialize_constraint.cpp +20 -20
- package/src/duckdb/src/storage/serialization/serialize_create_info.cpp +46 -42
- package/src/duckdb/src/storage/serialization/serialize_expression.cpp +63 -63
- package/src/duckdb/src/storage/serialization/serialize_logical_operator.cpp +167 -165
- package/src/duckdb/src/storage/serialization/serialize_macro_function.cpp +12 -12
- package/src/duckdb/src/storage/serialization/serialize_nodes.cpp +54 -54
- package/src/duckdb/src/storage/serialization/serialize_parse_info.cpp +88 -88
- package/src/duckdb/src/storage/serialization/serialize_parsed_expression.cpp +72 -72
- package/src/duckdb/src/storage/serialization/serialize_query_node.cpp +20 -20
- package/src/duckdb/src/storage/serialization/serialize_result_modifier.cpp +22 -22
- package/src/duckdb/src/storage/serialization/serialize_statement.cpp +4 -4
- package/src/duckdb/src/storage/serialization/serialize_storage.cpp +41 -6
- package/src/duckdb/src/storage/serialization/serialize_table_filter.cpp +24 -24
- package/src/duckdb/src/storage/serialization/serialize_tableref.cpp +32 -32
- package/src/duckdb/src/storage/serialization/serialize_types.cpp +29 -29
- package/src/duckdb/src/storage/single_file_block_manager.cpp +17 -22
- package/src/duckdb/src/storage/statistics/base_statistics.cpp +31 -85
- package/src/duckdb/src/storage/statistics/column_statistics.cpp +6 -19
- package/src/duckdb/src/storage/statistics/distinct_statistics.cpp +0 -26
- package/src/duckdb/src/storage/statistics/list_stats.cpp +6 -22
- package/src/duckdb/src/storage/statistics/numeric_stats.cpp +20 -135
- package/src/duckdb/src/storage/statistics/string_stats.cpp +5 -28
- package/src/duckdb/src/storage/statistics/struct_stats.cpp +8 -30
- package/src/duckdb/src/storage/storage_info.cpp +1 -1
- package/src/duckdb/src/storage/table/chunk_info.cpp +9 -88
- package/src/duckdb/src/storage/table/column_checkpoint_state.cpp +28 -34
- package/src/duckdb/src/storage/table/column_data.cpp +20 -25
- package/src/duckdb/src/storage/table/list_column_data.cpp +16 -9
- package/src/duckdb/src/storage/table/row_group.cpp +16 -92
- package/src/duckdb/src/storage/table/row_group_collection.cpp +5 -1
- package/src/duckdb/src/storage/table/standard_column_data.cpp +10 -7
- package/src/duckdb/src/storage/table/struct_column_data.cpp +17 -11
- package/src/duckdb/src/storage/table/table_statistics.cpp +13 -22
- package/src/duckdb/src/storage/wal_replay.cpp +108 -106
- package/src/duckdb/src/storage/write_ahead_log.cpp +135 -64
- package/src/duckdb/src/transaction/commit_state.cpp +22 -8
- package/src/duckdb/src/verification/deserialized_statement_verifier.cpp +11 -6
- package/src/duckdb/src/verification/statement_verifier.cpp +0 -5
- package/src/duckdb/third_party/parquet/parquet_types.h +1 -1
- package/src/duckdb/ub_src_common.cpp +0 -4
- package/src/duckdb/ub_src_common_serializer.cpp +2 -4
- package/src/duckdb/ub_src_planner.cpp +0 -2
- package/src/duckdb/ub_src_planner_expression.cpp +0 -2
- package/src/duckdb/ub_src_planner_operator.cpp +0 -8
- package/src/duckdb_node.cpp +6 -12
- package/src/duckdb_node.hpp +23 -13
- package/src/statement.cpp +15 -16
- package/test/database_fail.test.ts +20 -0
- package/test/worker.js +7 -0
- package/src/duckdb/src/common/field_writer.cpp +0 -97
- package/src/duckdb/src/common/serializer/buffered_deserializer.cpp +0 -27
- package/src/duckdb/src/common/serializer/buffered_serializer.cpp +0 -36
- package/src/duckdb/src/common/serializer.cpp +0 -24
- package/src/duckdb/src/include/duckdb/common/field_writer.hpp +0 -379
- package/src/duckdb/src/include/duckdb/common/serializer/buffered_deserializer.hpp +0 -41
- package/src/duckdb/src/include/duckdb/common/serializer/buffered_serializer.hpp +0 -50
- package/src/duckdb/src/include/duckdb/common/serializer.hpp +0 -151
- package/src/duckdb/src/include/duckdb/planner/plan_serialization.hpp +0 -44
- package/src/duckdb/src/include/duckdb/verification/deserialized_statement_verifier_v2.hpp +0 -32
- package/src/duckdb/src/planner/expression/bound_default_expression.cpp +0 -16
- package/src/duckdb/src/planner/operator/logical_execute.cpp +0 -12
- package/src/duckdb/src/planner/operator/logical_explain.cpp +0 -22
- package/src/duckdb/src/planner/operator/logical_export.cpp +0 -13
- package/src/duckdb/src/planner/operator/logical_show.cpp +0 -21
- package/src/duckdb/src/planner/parsed_data/bound_create_table_info.cpp +0 -22
- package/src/duckdb/src/planner/plan_serialization.cpp +0 -20
- package/src/duckdb/src/verification/deserialized_statement_verifier_v2.cpp +0 -34
- package/src/duckdb/ub_src_planner_parsed_data.cpp +0 -2
@@ -3,9 +3,8 @@
|
|
3
3
|
#include "duckdb/core_functions/aggregate/holistic_functions.hpp"
|
4
4
|
#include "duckdb/planner/expression.hpp"
|
5
5
|
#include "duckdb/common/queue.hpp"
|
6
|
-
#include "duckdb/common/
|
7
|
-
#include "duckdb/common/serializer/
|
8
|
-
#include "duckdb/common/serializer/format_deserializer.hpp"
|
6
|
+
#include "duckdb/common/serializer/serializer.hpp"
|
7
|
+
#include "duckdb/common/serializer/deserializer.hpp"
|
9
8
|
|
10
9
|
#include <algorithm>
|
11
10
|
#include <stdlib.h>
|
@@ -70,28 +69,14 @@ struct ReservoirQuantileBindData : public FunctionData {
|
|
70
69
|
return quantiles == other.quantiles && sample_size == other.sample_size;
|
71
70
|
}
|
72
71
|
|
73
|
-
static void Serialize(
|
74
|
-
|
75
|
-
auto &bind_data = bind_data_p->Cast<ReservoirQuantileBindData>();
|
76
|
-
writer.WriteList<double>(bind_data.quantiles);
|
77
|
-
writer.WriteField<int32_t>(bind_data.sample_size);
|
78
|
-
}
|
79
|
-
|
80
|
-
static unique_ptr<FunctionData> Deserialize(PlanDeserializationState &state, FieldReader &reader,
|
81
|
-
AggregateFunction &bound_function) {
|
82
|
-
auto quantiles = reader.ReadRequiredList<double>();
|
83
|
-
auto sample_size = reader.ReadRequired<int32_t>();
|
84
|
-
return make_uniq<ReservoirQuantileBindData>(std::move(quantiles), sample_size);
|
85
|
-
}
|
86
|
-
|
87
|
-
static void FormatSerialize(FormatSerializer &serializer, const optional_ptr<FunctionData> bind_data_p,
|
88
|
-
const AggregateFunction &function) {
|
72
|
+
static void Serialize(Serializer &serializer, const optional_ptr<FunctionData> bind_data_p,
|
73
|
+
const AggregateFunction &function) {
|
89
74
|
auto &bind_data = bind_data_p->Cast<ReservoirQuantileBindData>();
|
90
75
|
serializer.WriteProperty(100, "quantiles", bind_data.quantiles);
|
91
76
|
serializer.WriteProperty(101, "sample_size", bind_data.sample_size);
|
92
77
|
}
|
93
78
|
|
94
|
-
static unique_ptr<FunctionData>
|
79
|
+
static unique_ptr<FunctionData> Deserialize(Deserializer &deserializer, AggregateFunction &function) {
|
95
80
|
auto result = make_uniq<ReservoirQuantileBindData>();
|
96
81
|
deserializer.ReadProperty(100, "quantiles", result->quantiles);
|
97
82
|
deserializer.ReadProperty(101, "sample_size", result->sample_size);
|
@@ -373,8 +358,6 @@ unique_ptr<FunctionData> BindReservoirQuantileDecimal(ClientContext &context, Ag
|
|
373
358
|
function.name = "reservoir_quantile";
|
374
359
|
function.serialize = ReservoirQuantileBindData::Serialize;
|
375
360
|
function.deserialize = ReservoirQuantileBindData::Deserialize;
|
376
|
-
function.format_serialize = ReservoirQuantileBindData::FormatSerialize;
|
377
|
-
function.format_deserialize = ReservoirQuantileBindData::FormatDeserialize;
|
378
361
|
return bind_data;
|
379
362
|
}
|
380
363
|
|
@@ -383,8 +366,6 @@ AggregateFunction GetReservoirQuantileAggregate(PhysicalType type) {
|
|
383
366
|
fun.bind = BindReservoirQuantile;
|
384
367
|
fun.serialize = ReservoirQuantileBindData::Serialize;
|
385
368
|
fun.deserialize = ReservoirQuantileBindData::Deserialize;
|
386
|
-
fun.format_serialize = ReservoirQuantileBindData::FormatSerialize;
|
387
|
-
fun.format_deserialize = ReservoirQuantileBindData::FormatDeserialize;
|
388
369
|
// temporarily push an argument so we can bind the actual quantile
|
389
370
|
fun.arguments.emplace_back(LogicalType::DOUBLE);
|
390
371
|
return fun;
|
@@ -396,8 +377,6 @@ unique_ptr<FunctionData> BindReservoirQuantileDecimalList(ClientContext &context
|
|
396
377
|
auto bind_data = BindReservoirQuantile(context, function, arguments);
|
397
378
|
function.serialize = ReservoirQuantileBindData::Serialize;
|
398
379
|
function.deserialize = ReservoirQuantileBindData::Deserialize;
|
399
|
-
function.format_serialize = ReservoirQuantileBindData::FormatSerialize;
|
400
|
-
function.format_deserialize = ReservoirQuantileBindData::FormatDeserialize;
|
401
380
|
function.name = "reservoir_quantile";
|
402
381
|
return bind_data;
|
403
382
|
}
|
@@ -407,8 +386,6 @@ AggregateFunction GetReservoirQuantileListAggregate(const LogicalType &type) {
|
|
407
386
|
fun.bind = BindReservoirQuantile;
|
408
387
|
fun.serialize = ReservoirQuantileBindData::Serialize;
|
409
388
|
fun.deserialize = ReservoirQuantileBindData::Deserialize;
|
410
|
-
fun.format_serialize = ReservoirQuantileBindData::FormatSerialize;
|
411
|
-
fun.format_deserialize = ReservoirQuantileBindData::FormatDeserialize;
|
412
389
|
// temporarily push an argument so we can bind the actual quantile
|
413
390
|
auto list_of_double = LogicalType::LIST(LogicalType::DOUBLE);
|
414
391
|
fun.arguments.push_back(list_of_double);
|
@@ -437,8 +414,6 @@ static void GetReservoirQuantileDecimalFunction(AggregateFunctionSet &set, const
|
|
437
414
|
BindReservoirQuantileDecimal);
|
438
415
|
fun.serialize = ReservoirQuantileBindData::Serialize;
|
439
416
|
fun.deserialize = ReservoirQuantileBindData::Deserialize;
|
440
|
-
fun.format_serialize = ReservoirQuantileBindData::FormatSerialize;
|
441
|
-
fun.format_deserialize = ReservoirQuantileBindData::FormatDeserialize;
|
442
417
|
set.AddFunction(fun);
|
443
418
|
|
444
419
|
fun.arguments.emplace_back(LogicalType::INTEGER);
|
@@ -11,8 +11,6 @@
|
|
11
11
|
#include "duckdb/function/scalar/nested_functions.hpp"
|
12
12
|
#include "duckdb/planner/expression/bound_function_expression.hpp"
|
13
13
|
|
14
|
-
#include "duckdb/common/field_writer.hpp"
|
15
|
-
|
16
14
|
namespace duckdb {
|
17
15
|
|
18
16
|
DatePartSpecifier GetDateTypePartSpecifier(const string &specifier, LogicalType &type) {
|
@@ -1603,18 +1601,17 @@ struct StructDatePart {
|
|
1603
1601
|
result.Verify(count);
|
1604
1602
|
}
|
1605
1603
|
|
1606
|
-
static void SerializeFunction(
|
1604
|
+
static void SerializeFunction(Serializer &serializer, const optional_ptr<FunctionData> bind_data_p,
|
1607
1605
|
const ScalarFunction &function) {
|
1608
1606
|
D_ASSERT(bind_data_p);
|
1609
1607
|
auto &info = bind_data_p->Cast<BindData>();
|
1610
|
-
|
1611
|
-
|
1608
|
+
serializer.WriteProperty(100, "stype", info.stype);
|
1609
|
+
serializer.WriteProperty(101, "part_codes", info.part_codes);
|
1612
1610
|
}
|
1613
1611
|
|
1614
|
-
static unique_ptr<FunctionData> DeserializeFunction(
|
1615
|
-
|
1616
|
-
auto
|
1617
|
-
auto part_codes = reader.ReadRequiredList<DatePartSpecifier>();
|
1612
|
+
static unique_ptr<FunctionData> DeserializeFunction(Deserializer &deserializer, ScalarFunction &bound_function) {
|
1613
|
+
auto stype = deserializer.ReadProperty<LogicalType>(100, "stype");
|
1614
|
+
auto part_codes = deserializer.ReadProperty<vector<DatePartSpecifier>>(101, "part_codes");
|
1618
1615
|
return make_uniq<BindData>(std::move(stype), std::move(part_codes));
|
1619
1616
|
}
|
1620
1617
|
|
@@ -36,25 +36,30 @@ struct ListAggregatesBindData : public FunctionData {
|
|
36
36
|
auto &other = other_p.Cast<ListAggregatesBindData>();
|
37
37
|
return stype == other.stype && aggr_expr->Equals(*other.aggr_expr);
|
38
38
|
}
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
39
|
+
void Serialize(Serializer &serializer) const {
|
40
|
+
serializer.WriteProperty(1, "stype", stype);
|
41
|
+
serializer.WriteProperty(2, "aggr_expr", aggr_expr);
|
42
|
+
}
|
43
|
+
static unique_ptr<ListAggregatesBindData> Deserialize(Deserializer &deserializer) {
|
44
|
+
auto stype = deserializer.ReadProperty<LogicalType>(1, "stype");
|
45
|
+
auto aggr_expr = deserializer.ReadProperty<unique_ptr<Expression>>(2, "aggr_expr");
|
46
|
+
auto result = make_uniq<ListAggregatesBindData>(std::move(stype), std::move(aggr_expr));
|
47
|
+
return result;
|
48
48
|
}
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
49
|
+
|
50
|
+
static void Serialize(Serializer &serializer, const optional_ptr<FunctionData> bind_data_p,
|
51
|
+
const ScalarFunction &function) {
|
52
|
+
auto bind_data = dynamic_cast<const ListAggregatesBindData *>(bind_data_p.get());
|
53
|
+
serializer.WritePropertyWithDefault(100, "bind_data", bind_data, (const ListAggregatesBindData *)nullptr);
|
54
|
+
}
|
55
|
+
|
56
|
+
static unique_ptr<FunctionData> Deserialize(Deserializer &deserializer, ScalarFunction &bound_function) {
|
57
|
+
auto result = deserializer.ReadPropertyWithDefault<unique_ptr<ListAggregatesBindData>>(
|
58
|
+
100, "bind_data", unique_ptr<ListAggregatesBindData>(nullptr));
|
59
|
+
if (!result) {
|
56
60
|
return ListAggregatesBindFailure(bound_function);
|
57
61
|
}
|
62
|
+
return std::move(result);
|
58
63
|
}
|
59
64
|
};
|
60
65
|
|
@@ -8,8 +8,8 @@
|
|
8
8
|
#include "duckdb/planner/expression/bound_lambda_expression.hpp"
|
9
9
|
#include "duckdb/planner/expression/bound_cast_expression.hpp"
|
10
10
|
#include "duckdb/function/cast/cast_function_set.hpp"
|
11
|
-
#include "duckdb/common/serializer/
|
12
|
-
#include "duckdb/common/serializer/
|
11
|
+
#include "duckdb/common/serializer/serializer.hpp"
|
12
|
+
#include "duckdb/common/serializer/deserializer.hpp"
|
13
13
|
|
14
14
|
namespace duckdb {
|
15
15
|
|
@@ -23,26 +23,22 @@ struct ListLambdaBindData : public FunctionData {
|
|
23
23
|
public:
|
24
24
|
bool Equals(const FunctionData &other_p) const override;
|
25
25
|
unique_ptr<FunctionData> Copy() const override;
|
26
|
-
static void Serialize(FieldWriter &writer, const FunctionData *bind_data_p, const ScalarFunction &function) {
|
27
|
-
throw NotImplementedException("FIXME: list lambda serialize");
|
28
|
-
}
|
29
|
-
static unique_ptr<FunctionData> Deserialize(PlanDeserializationState &state, FieldReader &reader,
|
30
|
-
ScalarFunction &bound_function) {
|
31
|
-
throw NotImplementedException("FIXME: list lambda deserialize");
|
32
|
-
}
|
33
26
|
|
34
|
-
static void
|
35
|
-
|
36
|
-
auto &bind_data = bind_data_p->Cast<ListLambdaBindData>();
|
37
|
-
serializer.WriteProperty(100, "stype", bind_data.stype);
|
38
|
-
serializer.WritePropertyWithDefault(101, "lambda_expr", bind_data.lambda_expr,
|
27
|
+
static void Serialize(Serializer &serializer, const optional_ptr<FunctionData> bind_data_p,
|
28
|
+
const ScalarFunction &function) {
|
29
|
+
// auto &bind_data = bind_data_p->Cast<ListLambdaBindData>();
|
30
|
+
// serializer.WriteProperty(100, "stype", bind_data.stype);
|
31
|
+
// serializer.WritePropertyWithDefault(101, "lambda_expr", bind_data.lambda_expr,
|
32
|
+
// unique_ptr<Expression>());
|
33
|
+
throw NotImplementedException("FIXME: list lambda serialize");
|
39
34
|
}
|
40
35
|
|
41
|
-
static unique_ptr<FunctionData>
|
42
|
-
auto stype = deserializer.ReadProperty<LogicalType>(100, "stype");
|
43
|
-
auto lambda_expr =
|
44
|
-
deserializer.ReadPropertyWithDefault<unique_ptr<Expression>>(101, "lambda_expr",
|
45
|
-
return make_uniq<ListLambdaBindData>(stype, std::move(lambda_expr));
|
36
|
+
static unique_ptr<FunctionData> Deserialize(Deserializer &deserializer, ScalarFunction &function) {
|
37
|
+
// auto stype = deserializer.ReadProperty<LogicalType>(100, "stype");
|
38
|
+
// auto lambda_expr =
|
39
|
+
// deserializer.ReadPropertyWithDefault<unique_ptr<Expression>>(101, "lambda_expr",
|
40
|
+
// unique_ptr<Expression>()); return make_uniq<ListLambdaBindData>(stype, std::move(lambda_expr));
|
41
|
+
throw NotImplementedException("FIXME: list lambda deserialize");
|
46
42
|
}
|
47
43
|
};
|
48
44
|
|
@@ -401,8 +397,6 @@ ScalarFunction ListTransformFun::GetFunction() {
|
|
401
397
|
fun.null_handling = FunctionNullHandling::SPECIAL_HANDLING;
|
402
398
|
fun.serialize = ListLambdaBindData::Serialize;
|
403
399
|
fun.deserialize = ListLambdaBindData::Deserialize;
|
404
|
-
fun.format_serialize = ListLambdaBindData::FormatSerialize;
|
405
|
-
fun.format_deserialize = ListLambdaBindData::FormatDeserialize;
|
406
400
|
return fun;
|
407
401
|
}
|
408
402
|
|
@@ -412,8 +406,6 @@ ScalarFunction ListFilterFun::GetFunction() {
|
|
412
406
|
fun.null_handling = FunctionNullHandling::SPECIAL_HANDLING;
|
413
407
|
fun.serialize = ListLambdaBindData::Serialize;
|
414
408
|
fun.deserialize = ListLambdaBindData::Deserialize;
|
415
|
-
fun.format_serialize = ListLambdaBindData::FormatSerialize;
|
416
|
-
fun.format_deserialize = ListLambdaBindData::FormatDeserialize;
|
417
409
|
return fun;
|
418
410
|
}
|
419
411
|
|
@@ -985,10 +985,14 @@ BlockPointer ART::Serialize(MetadataWriter &writer) {
|
|
985
985
|
}
|
986
986
|
|
987
987
|
lock_guard<mutex> l(lock);
|
988
|
+
auto &block_manager = table_io_manager.GetIndexBlockManager();
|
989
|
+
PartialBlockManager partial_block_manager(block_manager, CheckpointType::FULL_CHECKPOINT);
|
990
|
+
|
988
991
|
vector<BlockPointer> allocator_pointers;
|
989
992
|
for (auto &allocator : *allocators) {
|
990
|
-
allocator_pointers.push_back(allocator->Serialize(writer));
|
993
|
+
allocator_pointers.push_back(allocator->Serialize(partial_block_manager, writer));
|
991
994
|
}
|
995
|
+
partial_block_manager.FlushPartialBlocks();
|
992
996
|
|
993
997
|
root_block_pointer = writer.GetBlockPointer();
|
994
998
|
writer.Write(tree);
|
@@ -26,6 +26,7 @@ void Leaf::New(ART &art, reference<Node> &node, const row_t *row_ids, idx_t coun
|
|
26
26
|
auto &leaf = Node::RefMutable<Leaf>(art, node, NType::LEAF);
|
27
27
|
|
28
28
|
leaf.count = MinValue((idx_t)Node::LEAF_SIZE, count);
|
29
|
+
|
29
30
|
for (idx_t i = 0; i < leaf.count; i++) {
|
30
31
|
leaf.row_ids[i] = row_ids[copy_count + i];
|
31
32
|
}
|
@@ -38,6 +39,16 @@ void Leaf::New(ART &art, reference<Node> &node, const row_t *row_ids, idx_t coun
|
|
38
39
|
}
|
39
40
|
}
|
40
41
|
|
42
|
+
Leaf &Leaf::New(ART &art, Node &node) {
|
43
|
+
node = Node::GetAllocator(art, NType::LEAF).New();
|
44
|
+
node.SetMetadata(static_cast<uint8_t>(NType::LEAF));
|
45
|
+
auto &leaf = Node::RefMutable<Leaf>(art, node, NType::LEAF);
|
46
|
+
|
47
|
+
leaf.count = 0;
|
48
|
+
leaf.ptr.Clear();
|
49
|
+
return leaf;
|
50
|
+
}
|
51
|
+
|
41
52
|
void Leaf::Free(ART &art, Node &node) {
|
42
53
|
|
43
54
|
Node current_node = node;
|
@@ -313,13 +324,10 @@ void Leaf::MoveInlinedToLeaf(ART &art, Node &node) {
|
|
313
324
|
|
314
325
|
D_ASSERT(node.GetType() == NType::LEAF_INLINED);
|
315
326
|
auto row_id = node.GetRowId();
|
316
|
-
|
317
|
-
node.SetMetadata(static_cast<uint8_t>(NType::LEAF));
|
327
|
+
auto &leaf = New(art, node);
|
318
328
|
|
319
|
-
auto &leaf = Node::RefMutable<Leaf>(art, node, NType::LEAF);
|
320
329
|
leaf.count = 1;
|
321
330
|
leaf.row_ids[0] = row_id;
|
322
|
-
leaf.ptr.Clear();
|
323
331
|
}
|
324
332
|
|
325
333
|
Leaf &Leaf::Append(ART &art, const row_t row_id) {
|
@@ -328,12 +336,7 @@ Leaf &Leaf::Append(ART &art, const row_t row_id) {
|
|
328
336
|
|
329
337
|
// we need a new leaf node
|
330
338
|
if (leaf.get().count == Node::LEAF_SIZE) {
|
331
|
-
leaf
|
332
|
-
leaf.get().ptr.SetMetadata(static_cast<uint8_t>(NType::LEAF));
|
333
|
-
|
334
|
-
leaf = Node::RefMutable<Leaf>(art, leaf.get().ptr, NType::LEAF);
|
335
|
-
leaf.get().count = 0;
|
336
|
-
leaf.get().ptr.Clear();
|
339
|
+
leaf = New(art, leaf.get().ptr);
|
337
340
|
}
|
338
341
|
|
339
342
|
leaf.get().row_ids[leaf.get().count] = row_id;
|
@@ -15,8 +15,6 @@ Node48 &Node48::New(ART &art, Node &node) {
|
|
15
15
|
for (idx_t i = 0; i < Node::NODE_256_CAPACITY; i++) {
|
16
16
|
n48.child_index[i] = Node::EMPTY_MARKER;
|
17
17
|
}
|
18
|
-
|
19
|
-
// necessary for faster child insertion/deletion
|
20
18
|
for (idx_t i = 0; i < Node::NODE_48_CAPACITY; i++) {
|
21
19
|
n48.children[i].Clear();
|
22
20
|
}
|
@@ -4,9 +4,6 @@
|
|
4
4
|
|
5
5
|
namespace duckdb {
|
6
6
|
|
7
|
-
constexpr idx_t FixedSizeAllocator::BASE[];
|
8
|
-
constexpr uint8_t FixedSizeAllocator::SHIFT[];
|
9
|
-
|
10
7
|
FixedSizeAllocator::FixedSizeAllocator(const idx_t segment_size, BlockManager &block_manager)
|
11
8
|
: block_manager(block_manager), buffer_manager(block_manager.buffer_manager),
|
12
9
|
metadata_manager(block_manager.GetMetadataManager()), segment_size(segment_size), total_segment_count(0) {
|
@@ -61,25 +58,36 @@ IndexPointer FixedSizeAllocator::New() {
|
|
61
58
|
D_ASSERT(buffers.find(buffer_id) != buffers.end());
|
62
59
|
auto &buffer = buffers.find(buffer_id)->second;
|
63
60
|
ValidityMask mask(reinterpret_cast<validity_t *>(buffer.Get()));
|
61
|
+
|
62
|
+
// zero-initialize the bitmask to avoid leaking memory to disk
|
63
|
+
auto data = mask.GetData();
|
64
|
+
for (idx_t i = 0; i < bitmask_count; i++) {
|
65
|
+
data[i] = 0;
|
66
|
+
}
|
67
|
+
|
68
|
+
// initializing the bitmask of the new buffer
|
64
69
|
mask.SetAllValid(available_segments_per_buffer);
|
65
70
|
}
|
66
71
|
|
67
|
-
// return a pointer
|
72
|
+
// return a pointer to a free segment
|
68
73
|
D_ASSERT(!buffers_with_free_space.empty());
|
69
74
|
auto buffer_id = uint32_t(*buffers_with_free_space.begin());
|
70
75
|
|
71
76
|
D_ASSERT(buffers.find(buffer_id) != buffers.end());
|
72
77
|
auto &buffer = buffers.find(buffer_id)->second;
|
73
|
-
auto
|
74
|
-
ValidityMask mask(bitmask_ptr);
|
75
|
-
auto offset = GetOffset(mask, buffer.segment_count);
|
78
|
+
auto offset = buffer.GetOffset(bitmask_count);
|
76
79
|
|
77
|
-
buffer.segment_count++;
|
78
80
|
total_segment_count++;
|
81
|
+
buffer.segment_count++;
|
79
82
|
if (buffer.segment_count == available_segments_per_buffer) {
|
80
83
|
buffers_with_free_space.erase(buffer_id);
|
81
84
|
}
|
82
85
|
|
86
|
+
// zero-initialize that segment
|
87
|
+
auto buffer_ptr = buffer.Get();
|
88
|
+
auto offset_in_buffer = buffer_ptr + offset * segment_size + bitmask_offset;
|
89
|
+
memset(offset_in_buffer, 0, segment_size);
|
90
|
+
|
83
91
|
return IndexPointer(buffer_id, offset);
|
84
92
|
}
|
85
93
|
|
@@ -95,13 +103,14 @@ void FixedSizeAllocator::Free(const IndexPointer ptr) {
|
|
95
103
|
ValidityMask mask(bitmask_ptr);
|
96
104
|
D_ASSERT(!mask.RowIsValid(offset));
|
97
105
|
mask.SetValid(offset);
|
98
|
-
buffers_with_free_space.insert(buffer_id);
|
99
106
|
|
100
107
|
D_ASSERT(total_segment_count > 0);
|
101
108
|
D_ASSERT(buffer.segment_count > 0);
|
102
109
|
|
103
|
-
|
110
|
+
// adjust the allocator fields
|
111
|
+
buffers_with_free_space.insert(buffer_id);
|
104
112
|
total_segment_count--;
|
113
|
+
buffer.segment_count--;
|
105
114
|
}
|
106
115
|
|
107
116
|
void FixedSizeAllocator::Reset() {
|
@@ -123,6 +132,16 @@ idx_t FixedSizeAllocator::GetMemoryUsage() const {
|
|
123
132
|
return memory_usage;
|
124
133
|
}
|
125
134
|
|
135
|
+
idx_t FixedSizeAllocator::GetUpperBoundBufferId() const {
|
136
|
+
idx_t upper_bound_id = 0;
|
137
|
+
for (auto &buffer : buffers) {
|
138
|
+
if (buffer.first >= upper_bound_id) {
|
139
|
+
upper_bound_id = buffer.first + 1;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
return upper_bound_id;
|
143
|
+
}
|
144
|
+
|
126
145
|
void FixedSizeAllocator::Merge(FixedSizeAllocator &other) {
|
127
146
|
|
128
147
|
D_ASSERT(segment_size == other.segment_size);
|
@@ -232,10 +251,10 @@ IndexPointer FixedSizeAllocator::VacuumPointer(const IndexPointer ptr) {
|
|
232
251
|
return new_ptr;
|
233
252
|
}
|
234
253
|
|
235
|
-
BlockPointer FixedSizeAllocator::Serialize(MetadataWriter &writer) {
|
254
|
+
BlockPointer FixedSizeAllocator::Serialize(PartialBlockManager &partial_block_manager, MetadataWriter &writer) {
|
236
255
|
|
237
256
|
for (auto &buffer : buffers) {
|
238
|
-
buffer.second.Serialize();
|
257
|
+
buffer.second.Serialize(partial_block_manager, available_segments_per_buffer, segment_size, bitmask_offset);
|
239
258
|
}
|
240
259
|
|
241
260
|
auto block_pointer = writer.GetBlockPointer();
|
@@ -245,8 +264,9 @@ BlockPointer FixedSizeAllocator::Serialize(MetadataWriter &writer) {
|
|
245
264
|
|
246
265
|
for (auto &buffer : buffers) {
|
247
266
|
writer.Write(buffer.first);
|
248
|
-
writer.Write(buffer.second.
|
267
|
+
writer.Write(buffer.second.block_pointer);
|
249
268
|
writer.Write(buffer.second.segment_count);
|
269
|
+
writer.Write(buffer.second.allocation_size);
|
250
270
|
}
|
251
271
|
for (auto &buffer_id : buffers_with_free_space) {
|
252
272
|
writer.Write(buffer_id);
|
@@ -266,63 +286,18 @@ void FixedSizeAllocator::Deserialize(const BlockPointer &block_pointer) {
|
|
266
286
|
|
267
287
|
for (idx_t i = 0; i < buffer_count; i++) {
|
268
288
|
auto buffer_id = reader.Read<idx_t>();
|
269
|
-
auto
|
270
|
-
auto
|
271
|
-
|
289
|
+
auto buffer_block_pointer = reader.Read<BlockPointer>();
|
290
|
+
auto segment_count = reader.Read<idx_t>();
|
291
|
+
auto allocation_size = reader.Read<idx_t>();
|
292
|
+
FixedSizeBuffer new_buffer(block_manager, segment_count, allocation_size, buffer_block_pointer);
|
272
293
|
buffers.insert(make_pair(buffer_id, std::move(new_buffer)));
|
273
|
-
total_segment_count +=
|
294
|
+
total_segment_count += segment_count;
|
274
295
|
}
|
275
296
|
for (idx_t i = 0; i < buffers_with_free_space_count; i++) {
|
276
297
|
buffers_with_free_space.insert(reader.Read<idx_t>());
|
277
298
|
}
|
278
299
|
}
|
279
300
|
|
280
|
-
uint32_t FixedSizeAllocator::GetOffset(ValidityMask &mask, const idx_t segment_count) {
|
281
|
-
|
282
|
-
auto data = mask.GetData();
|
283
|
-
|
284
|
-
// fills up a buffer sequentially before searching for free bits
|
285
|
-
if (mask.RowIsValid(segment_count)) {
|
286
|
-
mask.SetInvalid(segment_count);
|
287
|
-
return segment_count;
|
288
|
-
}
|
289
|
-
|
290
|
-
for (idx_t entry_idx = 0; entry_idx < bitmask_count; entry_idx++) {
|
291
|
-
// get an entry with free bits
|
292
|
-
if (data[entry_idx] == 0) {
|
293
|
-
continue;
|
294
|
-
}
|
295
|
-
|
296
|
-
// find the position of the free bit
|
297
|
-
auto entry = data[entry_idx];
|
298
|
-
idx_t first_valid_bit = 0;
|
299
|
-
|
300
|
-
// this loop finds the position of the rightmost set bit in entry and stores it
|
301
|
-
// in first_valid_bit
|
302
|
-
for (idx_t i = 0; i < 6; i++) {
|
303
|
-
// set the left half of the bits of this level to zero and test if the entry is still not zero
|
304
|
-
if (entry & BASE[i]) {
|
305
|
-
// first valid bit is in the rightmost s[i] bits
|
306
|
-
// permanently set the left half of the bits to zero
|
307
|
-
entry &= BASE[i];
|
308
|
-
} else {
|
309
|
-
// first valid bit is in the leftmost s[i] bits
|
310
|
-
// shift by s[i] for the next iteration and add s[i] to the position of the rightmost set bit
|
311
|
-
entry >>= SHIFT[i];
|
312
|
-
first_valid_bit += SHIFT[i];
|
313
|
-
}
|
314
|
-
}
|
315
|
-
D_ASSERT(entry);
|
316
|
-
|
317
|
-
auto prev_bits = entry_idx * sizeof(validity_t) * 8;
|
318
|
-
D_ASSERT(mask.RowIsValid(prev_bits + first_valid_bit));
|
319
|
-
mask.SetInvalid(prev_bits + first_valid_bit);
|
320
|
-
return (prev_bits + first_valid_bit);
|
321
|
-
}
|
322
|
-
|
323
|
-
throw InternalException("Invalid bitmask for FixedSizeAllocator");
|
324
|
-
}
|
325
|
-
|
326
301
|
idx_t FixedSizeAllocator::GetAvailableBufferId() const {
|
327
302
|
idx_t buffer_id = buffers.size();
|
328
303
|
while (buffers.find(buffer_id) != buffers.end()) {
|
@@ -332,14 +307,4 @@ idx_t FixedSizeAllocator::GetAvailableBufferId() const {
|
|
332
307
|
return buffer_id;
|
333
308
|
}
|
334
309
|
|
335
|
-
idx_t FixedSizeAllocator::GetUpperBoundBufferId() const {
|
336
|
-
idx_t upper_bound_id = 0;
|
337
|
-
for (auto &buffer : buffers) {
|
338
|
-
if (buffer.first >= upper_bound_id) {
|
339
|
-
upper_bound_id = buffer.first + 1;
|
340
|
-
}
|
341
|
-
}
|
342
|
-
return upper_bound_id;
|
343
|
-
}
|
344
|
-
|
345
310
|
} // namespace duckdb
|