From f3cde62497121ab286815b8b97445c5d70781139 Mon Sep 17 00:00:00 2001 From: Vasil Pashov Date: Thu, 28 Mar 2024 13:51:23 +0200 Subject: [PATCH] Improve build time - Fix compilation errors with clang-18 due to Werror - Run include-what-you-use to reduce includes and add forward declarations --- cpp/arcticdb/CMakeLists.txt | 18 ++--- cpp/arcticdb/async/async_store.hpp | 4 +- cpp/arcticdb/async/python_bindings.cpp | 1 - cpp/arcticdb/async/task_scheduler.hpp | 6 -- cpp/arcticdb/async/tasks.cpp | 1 - cpp/arcticdb/async/tasks.hpp | 3 - cpp/arcticdb/async/test/test_async.cpp | 5 +- cpp/arcticdb/codec/codec-inl.hpp | 1 - cpp/arcticdb/codec/codec.cpp | 7 +- cpp/arcticdb/codec/codec.hpp | 6 +- cpp/arcticdb/codec/encoding_sizes.cpp | 5 +- cpp/arcticdb/codec/encoding_sizes.hpp | 2 +- cpp/arcticdb/codec/python_bindings.cpp | 4 - cpp/arcticdb/codec/segment.cpp | 3 - cpp/arcticdb/codec/segment.hpp | 5 +- cpp/arcticdb/codec/slice_data_sink.hpp | 6 +- cpp/arcticdb/codec/test/test_codec.cpp | 1 - cpp/arcticdb/column_store/chunked_buffer.hpp | 7 +- cpp/arcticdb/column_store/column.hpp | 3 - cpp/arcticdb/column_store/column_utils.hpp | 2 +- .../column_store/memory_segment_impl.cpp | 2 +- .../column_store/memory_segment_impl.hpp | 4 +- cpp/arcticdb/column_store/python_bindings.cpp | 1 - cpp/arcticdb/column_store/string_pool.cpp | 2 - .../test/benchmark_memory_segment.cpp | 1 - .../test/ingestion_stress_test.cpp | 6 +- .../test/rapidcheck_chunked_buffer.cpp | 2 - .../column_store/test/rapidcheck_column.cpp | 9 +-- ...rapidcheck_column_data_random_accessor.cpp | 2 +- .../test/rapidcheck_column_map.cpp | 8 +- .../column_store/test/test_column.cpp | 1 - .../test/test_index_filtering.cpp | 2 +- cpp/arcticdb/entity/atom_key.hpp | 1 + cpp/arcticdb/entity/data_error.cpp | 2 - cpp/arcticdb/entity/field_collection.hpp | 6 +- cpp/arcticdb/entity/key.hpp | 5 -- cpp/arcticdb/entity/merge_descriptors.hpp | 6 +- cpp/arcticdb/entity/metrics.cpp | 11 ++- cpp/arcticdb/entity/metrics.hpp | 23 +++--- cpp/arcticdb/entity/ref_key.hpp | 1 + cpp/arcticdb/entity/types-inl.hpp | 1 - cpp/arcticdb/entity/types.hpp | 1 - cpp/arcticdb/log/log.cpp | 4 - cpp/arcticdb/pipeline/column_stats.hpp | 1 - cpp/arcticdb/pipeline/frame_slice.hpp | 1 - cpp/arcticdb/pipeline/frame_utils.cpp | 3 +- cpp/arcticdb/pipeline/frame_utils.hpp | 10 +-- .../pipeline/index_segment_reader.cpp | 5 +- .../pipeline/index_segment_reader.hpp | 10 +-- cpp/arcticdb/pipeline/pipeline_context.cpp | 3 +- cpp/arcticdb/pipeline/pipeline_context.hpp | 4 - cpp/arcticdb/pipeline/python_output_frame.cpp | 1 - cpp/arcticdb/pipeline/python_output_frame.hpp | 1 - cpp/arcticdb/pipeline/query.hpp | 15 +--- cpp/arcticdb/pipeline/read_frame.cpp | 11 ++- cpp/arcticdb/pipeline/read_frame.hpp | 17 ++-- cpp/arcticdb/pipeline/slicing.hpp | 12 +-- cpp/arcticdb/pipeline/string_pool_utils.cpp | 2 +- cpp/arcticdb/pipeline/test/test_pipeline.cpp | 6 -- cpp/arcticdb/pipeline/value.hpp | 1 + cpp/arcticdb/pipeline/write_frame.cpp | 9 --- cpp/arcticdb/pipeline/write_frame.hpp | 4 - cpp/arcticdb/processing/aggregation.cpp | 13 ++- cpp/arcticdb/processing/aggregation.hpp | 2 - cpp/arcticdb/processing/clause.cpp | 36 +++++---- cpp/arcticdb/processing/clause.hpp | 11 --- cpp/arcticdb/processing/component_manager.hpp | 28 +++++-- .../processing/operation_dispatch.cpp | 1 + .../processing/operation_dispatch.hpp | 14 ---- .../processing/operation_dispatch_binary.cpp | 61 ++++++++++++++ .../processing/operation_dispatch_binary.hpp | 79 +------------------ .../operation_dispatch_binary_eq.cpp | 16 ---- .../operation_dispatch_binary_gt.cpp | 16 ---- .../operation_dispatch_binary_lt.cpp | 16 ---- .../operation_dispatch_binary_operator.cpp | 18 ----- .../processing/operation_dispatch_unary.hpp | 8 +- cpp/arcticdb/processing/processing_unit.cpp | 1 + cpp/arcticdb/processing/processing_unit.hpp | 8 +- .../processing/test/benchmark_clause.cpp | 7 +- cpp/arcticdb/processing/test/test_clause.cpp | 4 +- .../test/test_component_manager.cpp | 15 ++-- .../test/test_has_valid_type_promotion.cpp | 2 +- cpp/arcticdb/python/normalization_checks.cpp | 1 - cpp/arcticdb/python/python_handlers.cpp | 1 + cpp/arcticdb/python/python_handlers.hpp | 8 +- cpp/arcticdb/python/python_module.cpp | 1 - .../python/python_to_tensor_frame.cpp | 3 +- .../python/python_to_tensor_frame.hpp | 6 +- .../storage/azure/azure_mock_client.cpp | 6 +- .../storage/azure/azure_mock_client.hpp | 10 +-- .../storage/azure/azure_real_client.cpp | 3 - .../storage/azure/azure_real_client.hpp | 4 - cpp/arcticdb/storage/azure/azure_storage.cpp | 11 --- cpp/arcticdb/storage/azure/azure_storage.hpp | 11 +-- cpp/arcticdb/storage/config_resolvers.cpp | 10 +-- cpp/arcticdb/storage/config_resolvers.hpp | 7 +- cpp/arcticdb/storage/failure_simulation.hpp | 3 +- cpp/arcticdb/storage/file/file_store.hpp | 13 +-- .../storage/file/mapped_file_storage.cpp | 4 - .../storage/file/mapped_file_storage.hpp | 3 +- cpp/arcticdb/storage/library_manager.cpp | 4 - cpp/arcticdb/storage/library_manager.hpp | 14 +++- cpp/arcticdb/storage/library_path.hpp | 7 +- .../storage/lmdb/lmdb_mock_client.cpp | 2 +- .../storage/lmdb/lmdb_mock_client.hpp | 6 +- .../storage/lmdb/lmdb_real_client.cpp | 1 - .../storage/lmdb/lmdb_real_client.hpp | 2 - cpp/arcticdb/storage/lmdb/lmdb_storage.cpp | 5 +- cpp/arcticdb/storage/lmdb/lmdb_storage.hpp | 20 +++-- .../storage/memory/memory_storage.cpp | 1 - .../storage/memory/memory_storage.hpp | 5 +- cpp/arcticdb/storage/mongo/mongo_client.cpp | 4 +- cpp/arcticdb/storage/mongo/mongo_client.hpp | 2 - cpp/arcticdb/storage/mongo/mongo_instance.hpp | 1 - .../storage/mongo/mongo_mock_client.cpp | 4 +- .../storage/mongo/mongo_mock_client.hpp | 6 +- cpp/arcticdb/storage/mongo/mongo_storage.cpp | 4 - cpp/arcticdb/storage/mongo/mongo_storage.hpp | 6 +- cpp/arcticdb/storage/python_bindings.cpp | 3 +- cpp/arcticdb/storage/python_bindings.hpp | 4 - .../storage/rocksdb/rocksdb_storage.hpp | 5 +- .../storage/s3/nfs_backed_storage.cpp | 2 + .../storage/s3/nfs_backed_storage.hpp | 14 +--- cpp/arcticdb/storage/s3/s3_api.cpp | 1 - cpp/arcticdb/storage/s3/s3_mock_client.cpp | 3 - cpp/arcticdb/storage/s3/s3_mock_client.hpp | 16 +--- cpp/arcticdb/storage/s3/s3_real_client.cpp | 4 - cpp/arcticdb/storage/s3/s3_real_client.hpp | 12 +-- cpp/arcticdb/storage/s3/s3_storage.cpp | 23 +----- cpp/arcticdb/storage/s3/s3_storage.hpp | 11 +-- cpp/arcticdb/storage/s3/s3_storage_tool.cpp | 5 +- cpp/arcticdb/storage/s3/s3_storage_tool.hpp | 3 +- cpp/arcticdb/storage/storage.hpp | 1 - cpp/arcticdb/storage/storage_factory.hpp | 2 - cpp/arcticdb/storage/test/in_memory_store.hpp | 1 + .../storage/test/test_azure_storage.cpp | 4 +- cpp/arcticdb/storage/test/test_embedded.cpp | 3 - .../storage/test/test_memory_storage.cpp | 1 - .../storage/test/test_mongo_storage.cpp | 4 - cpp/arcticdb/storage/test/test_s3_storage.cpp | 3 - .../storage/test/test_storage_exceptions.cpp | 1 - cpp/arcticdb/stream/aggregator.hpp | 1 - cpp/arcticdb/stream/append_map.cpp | 6 +- cpp/arcticdb/stream/append_map.hpp | 7 +- cpp/arcticdb/stream/piloted_clock.hpp | 1 - cpp/arcticdb/stream/python_bindings.cpp | 6 -- .../stream/test/stream_test_common.cpp | 6 +- .../stream/test/stream_test_common.hpp | 29 +------ cpp/arcticdb/stream/test/test_aggregator.cpp | 2 - cpp/arcticdb/stream/test/test_append_map.cpp | 1 + cpp/arcticdb/stream/test/test_row_builder.cpp | 1 - .../stream/test/test_segment_aggregator.cpp | 4 +- .../stream/test/test_store_common.hpp | 26 ++++++ cpp/arcticdb/stream/test/test_types.cpp | 1 - cpp/arcticdb/toolbox/library_tool.cpp | 2 - cpp/arcticdb/toolbox/library_tool.hpp | 3 - cpp/arcticdb/toolbox/python_bindings.cpp | 2 - cpp/arcticdb/util/allocator.cpp | 3 +- cpp/arcticdb/util/buffer.hpp | 4 +- cpp/arcticdb/util/buffer_holder.hpp | 2 +- cpp/arcticdb/util/buffer_pool.cpp | 2 +- cpp/arcticdb/util/buffer_pool.hpp | 6 +- cpp/arcticdb/util/decimal.cpp | 1 - cpp/arcticdb/util/error_code.hpp | 4 - cpp/arcticdb/util/format_date.hpp | 3 +- cpp/arcticdb/util/memory_mapped_file.hpp | 5 +- cpp/arcticdb/util/memory_tracing.hpp | 2 +- cpp/arcticdb/util/name_validation.cpp | 15 ++-- cpp/arcticdb/util/name_validation.hpp | 12 ++- cpp/arcticdb/util/test/gtest_main.cpp | 2 +- .../util/test/rapidcheck_generators.cpp | 1 + .../util/test/rapidcheck_generators.hpp | 21 +++-- .../util/test/rapidcheck_string_pool.cpp | 2 +- cpp/arcticdb/util/test/test_bitmagic.cpp | 5 +- cpp/arcticdb/util/test/test_buffer_pool.cpp | 1 + cpp/arcticdb/util/test/test_cursor.cpp | 1 - cpp/arcticdb/util/test/test_format_date.cpp | 1 - cpp/arcticdb/util/test/test_hash.cpp | 1 - .../util/test/test_ranges_from_future.cpp | 1 - .../util/test/test_tracing_allocator.cpp | 1 - cpp/arcticdb/util/type_handler.hpp | 2 +- .../version/local_versioned_engine.cpp | 5 +- .../version/local_versioned_engine.hpp | 6 -- cpp/arcticdb/version/python_bindings.cpp | 4 +- cpp/arcticdb/version/python_bindings.hpp | 5 +- cpp/arcticdb/version/schema_checks.hpp | 2 +- cpp/arcticdb/version/snapshot.cpp | 2 + cpp/arcticdb/version/snapshot.hpp | 7 -- .../version/test/rapidcheck_version_map.cpp | 10 +-- cpp/arcticdb/version/test/test_merge.cpp | 2 + cpp/arcticdb/version/test/test_sparse.cpp | 2 + .../version/test/test_symbol_list.cpp | 4 +- .../version/test/test_version_map.cpp | 8 +- .../version/test/test_version_map_batch.cpp | 3 + .../version/test/test_version_store.cpp | 10 +-- cpp/arcticdb/version/version_core-inl.hpp | 15 +++- cpp/arcticdb/version/version_core.cpp | 17 ++-- cpp/arcticdb/version/version_core.hpp | 17 ++-- .../version/version_map_batch_methods.cpp | 1 + .../version/version_map_batch_methods.hpp | 5 +- cpp/arcticdb/version/version_store_api.cpp | 10 +-- cpp/arcticdb/version/version_store_api.hpp | 20 ----- cpp/arcticdb/version/version_utils.hpp | 1 - 203 files changed, 478 insertions(+), 862 deletions(-) delete mode 100644 cpp/arcticdb/processing/operation_dispatch_binary_eq.cpp delete mode 100644 cpp/arcticdb/processing/operation_dispatch_binary_gt.cpp delete mode 100644 cpp/arcticdb/processing/operation_dispatch_binary_lt.cpp delete mode 100644 cpp/arcticdb/processing/operation_dispatch_binary_operator.cpp create mode 100644 cpp/arcticdb/stream/test/test_store_common.hpp diff --git a/cpp/arcticdb/CMakeLists.txt b/cpp/arcticdb/CMakeLists.txt index 9e1eb0daeb9..c68636850de 100644 --- a/cpp/arcticdb/CMakeLists.txt +++ b/cpp/arcticdb/CMakeLists.txt @@ -433,10 +433,6 @@ set(arcticdb_srcs processing/operation_dispatch.cpp processing/operation_dispatch_unary.cpp processing/operation_dispatch_binary.cpp - processing/operation_dispatch_binary_eq.cpp - processing/operation_dispatch_binary_gt.cpp - processing/operation_dispatch_binary_lt.cpp - processing/operation_dispatch_binary_operator.cpp python/python_to_tensor_frame.cpp storage/config_resolvers.cpp storage/failure_simulation.cpp @@ -797,7 +793,9 @@ if(${TEST}) storage/test/test_storage_factory.cpp storage/test/test_storage_exceptions.cpp storage/test/test_azure_storage.cpp + stream/test/stream_test_common.hpp stream/test/stream_test_common.cpp + stream/test/test_store_common.hpp stream/test/test_aggregator.cpp stream/test/test_append_map.cpp stream/test/test_row_builder.cpp @@ -917,13 +915,13 @@ if(${TEST}) target_link_libraries(benchmarks PUBLIC - benchmark::benchmark - benchmark::benchmark_main - ${COMMON_PUBLIC_TEST_LIBRARIES} + benchmark::benchmark + benchmark::benchmark_main PRIVATE - ${AWSSDK_LINK_LIBRARIES} - arcticdb_core_static - ) + arcticdb_core_static + Python::Python + ${AWSSDK_LINK_LIBRARIES} + ) set(rapidcheck_srcs column_store/test/rapidcheck_column_store.cpp diff --git a/cpp/arcticdb/async/async_store.hpp b/cpp/arcticdb/async/async_store.hpp index 6f2d6c94136..b89a202b934 100644 --- a/cpp/arcticdb/async/async_store.hpp +++ b/cpp/arcticdb/async/async_store.hpp @@ -10,11 +10,9 @@ #include #include #include -#include #include #include #include -#include #include #include @@ -350,7 +348,7 @@ std::vector> batch_key_exists( std::move(seg), codec_, encoding_version_}(); - return std::pair(std::move(key_seg), std::move(slice)); + return std::pair(std::move(key_seg), std::move(slice)); }) .thenValue([de_dup_map](auto &&ks) -> std::pair { auto [key_seg, slice] = std::forward(ks); diff --git a/cpp/arcticdb/async/python_bindings.cpp b/cpp/arcticdb/async/python_bindings.cpp index 1dab925a2ae..c0f6418d9db 100644 --- a/cpp/arcticdb/async/python_bindings.cpp +++ b/cpp/arcticdb/async/python_bindings.cpp @@ -5,7 +5,6 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include #include #include diff --git a/cpp/arcticdb/async/task_scheduler.hpp b/cpp/arcticdb/async/task_scheduler.hpp index 91a7a182225..50bab8b33f3 100644 --- a/cpp/arcticdb/async/task_scheduler.hpp +++ b/cpp/arcticdb/async/task_scheduler.hpp @@ -7,12 +7,7 @@ #pragma once -#include -#include -#include -#include #include -#include #include #include @@ -25,7 +20,6 @@ #include #include #include -#include #include namespace arcticdb::async { diff --git a/cpp/arcticdb/async/tasks.cpp b/cpp/arcticdb/async/tasks.cpp index b99bcf91e6b..779a9c219b5 100644 --- a/cpp/arcticdb/async/tasks.cpp +++ b/cpp/arcticdb/async/tasks.cpp @@ -6,7 +6,6 @@ */ #include -#include namespace arcticdb::async { diff --git a/cpp/arcticdb/async/tasks.hpp b/cpp/arcticdb/async/tasks.hpp index 5e870a3eaec..1536b986391 100644 --- a/cpp/arcticdb/async/tasks.hpp +++ b/cpp/arcticdb/async/tasks.hpp @@ -11,16 +11,13 @@ #include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include diff --git a/cpp/arcticdb/async/test/test_async.cpp b/cpp/arcticdb/async/test/test_async.cpp index 50111632ce2..9d5a2b5b0aa 100644 --- a/cpp/arcticdb/async/test/test_async.cpp +++ b/cpp/arcticdb/async/test/test_async.cpp @@ -9,13 +9,10 @@ #include #include #include -#include #include #include #include -#include -#include #include #include @@ -43,7 +40,7 @@ TEST(Async, SinkBasic) { auto seg = ac::SegmentInMemory(); aa::EncodeAtomTask enc{ - ac::entity::KeyType::GENERATION, ac::entity::VersionId{6}, ac::entity::NumericId{123}, ac::entity::NumericId{456}, ac::timestamp{457}, {ac::entity::NumericIndex{999}}, std::move(seg), codec_opt, ac::EncodingVersion::V2 + ac::entity::KeyType::GENERATION, ac::entity::VersionId{6}, ac::entity::NumericId{123}, ac::entity::NumericId{456}, ac::timestamp{457}, ac::entity::NumericIndex{999}, std::move(seg), codec_opt, ac::EncodingVersion::V2 }; auto v = sched.submit_cpu_task(std::move(enc)).via(&aa::io_executor()).thenValue(aa::WriteSegmentTask{lib}).get(); diff --git a/cpp/arcticdb/codec/codec-inl.hpp b/cpp/arcticdb/codec/codec-inl.hpp index 4adcfc6f763..8e1e0776a8c 100644 --- a/cpp/arcticdb/codec/codec-inl.hpp +++ b/cpp/arcticdb/codec/codec-inl.hpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/cpp/arcticdb/codec/codec.cpp b/cpp/arcticdb/codec/codec.cpp index 2c21c6ad344..b99334d2455 100644 --- a/cpp/arcticdb/codec/codec.cpp +++ b/cpp/arcticdb/codec/codec.cpp @@ -6,16 +6,13 @@ */ #include #include -#include #include -#include #include #include - +#include +#include #include -#include - #include diff --git a/cpp/arcticdb/codec/codec.hpp b/cpp/arcticdb/codec/codec.hpp index 28bc60c8068..2820a134935 100644 --- a/cpp/arcticdb/codec/codec.hpp +++ b/cpp/arcticdb/codec/codec.hpp @@ -7,9 +7,6 @@ #pragma once -#include -#include -#include #include #include @@ -17,6 +14,9 @@ namespace arcticdb { using ShapesBlockTDT = TypeDescriptorTag, DimensionTag>; +class SegmentInMemory; +class Segment; + Segment encode_dispatch( SegmentInMemory&& in_mem_seg, const arcticdb::proto::encoding::VariantCodec &codec_opts, diff --git a/cpp/arcticdb/codec/encoding_sizes.cpp b/cpp/arcticdb/codec/encoding_sizes.cpp index 393b3ba8f17..31cb9fca362 100644 --- a/cpp/arcticdb/codec/encoding_sizes.cpp +++ b/cpp/arcticdb/codec/encoding_sizes.cpp @@ -5,9 +5,8 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include -#include -#include +#include +#include namespace arcticdb::encoding_sizes { diff --git a/cpp/arcticdb/codec/encoding_sizes.hpp b/cpp/arcticdb/codec/encoding_sizes.hpp index ca29b6bf05f..06cefb78168 100644 --- a/cpp/arcticdb/codec/encoding_sizes.hpp +++ b/cpp/arcticdb/codec/encoding_sizes.hpp @@ -7,11 +7,11 @@ #pragma once -#include #include #include #include #include +#include namespace arcticdb::encoding_sizes { diff --git a/cpp/arcticdb/codec/python_bindings.cpp b/cpp/arcticdb/codec/python_bindings.cpp index eeddaffd12a..8474bd8bee4 100644 --- a/cpp/arcticdb/codec/python_bindings.cpp +++ b/cpp/arcticdb/codec/python_bindings.cpp @@ -13,16 +13,12 @@ #include #include #include -#include #include #include #include -#include - #include #include -#include namespace py = pybind11; using namespace arcticdb::python_util; diff --git a/cpp/arcticdb/codec/segment.cpp b/cpp/arcticdb/codec/segment.cpp index 5eeab44b0da..ae3a0b01fd9 100644 --- a/cpp/arcticdb/codec/segment.cpp +++ b/cpp/arcticdb/codec/segment.cpp @@ -7,12 +7,9 @@ #include #include -#include -#include #include #include -#include namespace arcticdb { namespace segment_size { diff --git a/cpp/arcticdb/codec/segment.hpp b/cpp/arcticdb/codec/segment.hpp index 2e8b344843e..3d9fc8638dd 100644 --- a/cpp/arcticdb/codec/segment.hpp +++ b/cpp/arcticdb/codec/segment.hpp @@ -7,12 +7,9 @@ #pragma once -#include "util/buffer.hpp" +#include #include -#include -#include #include -#include #include #include diff --git a/cpp/arcticdb/codec/slice_data_sink.hpp b/cpp/arcticdb/codec/slice_data_sink.hpp index 0cc9d4374fa..b85772aa148 100644 --- a/cpp/arcticdb/codec/slice_data_sink.hpp +++ b/cpp/arcticdb/codec/slice_data_sink.hpp @@ -16,9 +16,9 @@ struct SliceDataSink { SliceDataSink(uint8_t *data, std::size_t size) : data_(data), shape_(0), current_size_(0), total_size_(size) { } - shape_t *allocate_shapes(std::size_t s) ARCTICDB_UNUSED { + entity::shape_t *allocate_shapes(std::size_t s) ARCTICDB_UNUSED { if (s == 0) return nullptr; - util::check_arg(s == 8, "expected exactly one shape, actual {}", s / sizeof(shape_t)); + util::check_arg(s == 8, "expected exactly one shape, actual {}", s / sizeof(entity::shape_t)); return &shape_; } @@ -37,7 +37,7 @@ struct SliceDataSink { private: uint8_t *data_; - shape_t shape_; + entity::shape_t shape_; std::size_t current_size_; std::size_t total_size_; }; diff --git a/cpp/arcticdb/codec/test/test_codec.cpp b/cpp/arcticdb/codec/test/test_codec.cpp index 5cd20bddd27..3e60023e5da 100644 --- a/cpp/arcticdb/codec/test/test_codec.cpp +++ b/cpp/arcticdb/codec/test/test_codec.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/cpp/arcticdb/column_store/chunked_buffer.hpp b/cpp/arcticdb/column_store/chunked_buffer.hpp index 4daa91b1ca0..b1539700543 100644 --- a/cpp/arcticdb/column_store/chunked_buffer.hpp +++ b/cpp/arcticdb/column_store/chunked_buffer.hpp @@ -9,15 +9,16 @@ #pragma once #include -#include #include #include #include -#include - #include +#ifndef DEBUG_BUILD +#include +#endif + namespace arcticdb { /* diff --git a/cpp/arcticdb/column_store/column.hpp b/cpp/arcticdb/column_store/column.hpp index 7d7a11cdbe4..69b2996576e 100644 --- a/cpp/arcticdb/column_store/column.hpp +++ b/cpp/arcticdb/column_store/column.hpp @@ -19,13 +19,10 @@ #include #include -#include // Compilation fails on Mac if cstdio is not included prior to folly/Function.h due to a missing definition of memalign in folly/Memory.h #ifdef __APPLE__ #include #endif -#include -#include #include #include diff --git a/cpp/arcticdb/column_store/column_utils.hpp b/cpp/arcticdb/column_store/column_utils.hpp index 90a35a1048e..d17a6f57a2f 100644 --- a/cpp/arcticdb/column_store/column_utils.hpp +++ b/cpp/arcticdb/column_store/column_utils.hpp @@ -9,7 +9,7 @@ #include #include - +#include #include namespace arcticdb::detail { diff --git a/cpp/arcticdb/column_store/memory_segment_impl.cpp b/cpp/arcticdb/column_store/memory_segment_impl.cpp index bf69e721d78..804f206f28f 100644 --- a/cpp/arcticdb/column_store/memory_segment_impl.cpp +++ b/cpp/arcticdb/column_store/memory_segment_impl.cpp @@ -5,12 +5,12 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ +#include #include #include #include #include -#include #include diff --git a/cpp/arcticdb/column_store/memory_segment_impl.hpp b/cpp/arcticdb/column_store/memory_segment_impl.hpp index 9747be880bb..34e2616bb8b 100644 --- a/cpp/arcticdb/column_store/memory_segment_impl.hpp +++ b/cpp/arcticdb/column_store/memory_segment_impl.hpp @@ -11,12 +11,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -28,7 +28,7 @@ namespace google::protobuf } namespace arcticdb { - +class ColumnMap; class SegmentInMemoryImpl; namespace { diff --git a/cpp/arcticdb/column_store/python_bindings.cpp b/cpp/arcticdb/column_store/python_bindings.cpp index d35b3cb6574..224a9b2070e 100644 --- a/cpp/arcticdb/column_store/python_bindings.cpp +++ b/cpp/arcticdb/column_store/python_bindings.cpp @@ -10,7 +10,6 @@ #include #include #include -#include namespace py = pybind11; diff --git a/cpp/arcticdb/column_store/string_pool.cpp b/cpp/arcticdb/column_store/string_pool.cpp index c16d3bc61b5..948c6036509 100644 --- a/cpp/arcticdb/column_store/string_pool.cpp +++ b/cpp/arcticdb/column_store/string_pool.cpp @@ -10,8 +10,6 @@ #include #include -#include - namespace arcticdb { /***************** diff --git a/cpp/arcticdb/column_store/test/benchmark_memory_segment.cpp b/cpp/arcticdb/column_store/test/benchmark_memory_segment.cpp index 69613fc011f..b7dc12ad511 100644 --- a/cpp/arcticdb/column_store/test/benchmark_memory_segment.cpp +++ b/cpp/arcticdb/column_store/test/benchmark_memory_segment.cpp @@ -9,7 +9,6 @@ #include #include -#include #include diff --git a/cpp/arcticdb/column_store/test/ingestion_stress_test.cpp b/cpp/arcticdb/column_store/test/ingestion_stress_test.cpp index 5204eafdf27..b50bda6c4ea 100644 --- a/cpp/arcticdb/column_store/test/ingestion_stress_test.cpp +++ b/cpp/arcticdb/column_store/test/ingestion_stress_test.cpp @@ -7,16 +7,14 @@ #include #include -#include -#include -#include #include #include -#include #include #include #include +#include +#include using namespace arcticdb; namespace as = arcticdb::stream; diff --git a/cpp/arcticdb/column_store/test/rapidcheck_chunked_buffer.cpp b/cpp/arcticdb/column_store/test/rapidcheck_chunked_buffer.cpp index 0567f9102fc..494b33864f9 100644 --- a/cpp/arcticdb/column_store/test/rapidcheck_chunked_buffer.cpp +++ b/cpp/arcticdb/column_store/test/rapidcheck_chunked_buffer.cpp @@ -7,12 +7,10 @@ #include "gtest/gtest.h" #include - #include #include #include -#include TEST(ChunkedBuffer, Basic) { using namespace arcticdb; diff --git a/cpp/arcticdb/column_store/test/rapidcheck_column.cpp b/cpp/arcticdb/column_store/test/rapidcheck_column.cpp index 53257e15ed3..50d2a9189b1 100644 --- a/cpp/arcticdb/column_store/test/rapidcheck_column.cpp +++ b/cpp/arcticdb/column_store/test/rapidcheck_column.cpp @@ -7,13 +7,10 @@ #include #include -#include - -#include -#include +#include +#include #include -#include struct ColumnModel { std::vector data; @@ -89,7 +86,7 @@ struct ColumnRead : rc::state::Command { RC_GTEST_PROP(Column, Rapidcheck, ()) { ColumnModel initial_state; - arcticdb::Column sut(TypeDescriptor(DataType::UINT64, Dimension::Dim0), 0, false, false); + arcticdb::Column sut(arcticdb::entity::TypeDescriptor(arcticdb::entity::DataType::UINT64, arcticdb::entity::Dimension::Dim0), 0, false, false); rc::state::check(initial_state, sut, &rc::state::gen::execOneOf); diff --git a/cpp/arcticdb/column_store/test/rapidcheck_column_data_random_accessor.cpp b/cpp/arcticdb/column_store/test/rapidcheck_column_data_random_accessor.cpp index 8f5c378e6a3..4e26a7c3388 100644 --- a/cpp/arcticdb/column_store/test/rapidcheck_column_data_random_accessor.cpp +++ b/cpp/arcticdb/column_store/test/rapidcheck_column_data_random_accessor.cpp @@ -6,10 +6,10 @@ */ #include +#include #include #include -#include // Tricky to construct columns using a ChunkedBuffer with the testing size of 64 bytes, so only use rapidcheck for // single block tests, and test regualr and irregular accessors in test_column_data_random_accessor.cpp diff --git a/cpp/arcticdb/column_store/test/rapidcheck_column_map.cpp b/cpp/arcticdb/column_store/test/rapidcheck_column_map.cpp index 9eb551b5a8e..7cb8b9108b8 100644 --- a/cpp/arcticdb/column_store/test/rapidcheck_column_map.cpp +++ b/cpp/arcticdb/column_store/test/rapidcheck_column_map.cpp @@ -5,14 +5,12 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include -#include #include - -#include -#include #include #include +#include +#include +#include #include using namespace arcticdb; diff --git a/cpp/arcticdb/column_store/test/test_column.cpp b/cpp/arcticdb/column_store/test/test_column.cpp index bd652428a53..8086f58b67e 100644 --- a/cpp/arcticdb/column_store/test/test_column.cpp +++ b/cpp/arcticdb/column_store/test/test_column.cpp @@ -9,7 +9,6 @@ #include #include -#include #include #include diff --git a/cpp/arcticdb/column_store/test/test_index_filtering.cpp b/cpp/arcticdb/column_store/test/test_index_filtering.cpp index a2469d23e77..b647b40622f 100644 --- a/cpp/arcticdb/column_store/test/test_index_filtering.cpp +++ b/cpp/arcticdb/column_store/test/test_index_filtering.cpp @@ -8,11 +8,11 @@ #include #include -#include #include #include #include #include +#include namespace arcticdb { using namespace arcticdb::pipelines; diff --git a/cpp/arcticdb/entity/atom_key.hpp b/cpp/arcticdb/entity/atom_key.hpp index a78b1d1997d..ebfc29649a4 100644 --- a/cpp/arcticdb/entity/atom_key.hpp +++ b/cpp/arcticdb/entity/atom_key.hpp @@ -7,6 +7,7 @@ #pragma once +#include #include #include #include diff --git a/cpp/arcticdb/entity/data_error.cpp b/cpp/arcticdb/entity/data_error.cpp index 0c06212020a..326cfe2a44a 100644 --- a/cpp/arcticdb/entity/data_error.cpp +++ b/cpp/arcticdb/entity/data_error.cpp @@ -7,8 +7,6 @@ #include -#include - namespace arcticdb::entity { DataError::DataError(StreamId symbol, diff --git a/cpp/arcticdb/entity/field_collection.hpp b/cpp/arcticdb/entity/field_collection.hpp index 891e5a975d7..e0b10f5f561 100644 --- a/cpp/arcticdb/entity/field_collection.hpp +++ b/cpp/arcticdb/entity/field_collection.hpp @@ -8,9 +8,9 @@ #pragma once #include -#include -#include -#include +#include +#include +#include #include namespace arcticdb { diff --git a/cpp/arcticdb/entity/key.hpp b/cpp/arcticdb/entity/key.hpp index 106cd10239b..6320613fb34 100644 --- a/cpp/arcticdb/entity/key.hpp +++ b/cpp/arcticdb/entity/key.hpp @@ -8,12 +8,7 @@ #pragma once #include -#include #include -#include -#include -#include -#include #include #include diff --git a/cpp/arcticdb/entity/merge_descriptors.hpp b/cpp/arcticdb/entity/merge_descriptors.hpp index be491c8f50c..051e8716e26 100644 --- a/cpp/arcticdb/entity/merge_descriptors.hpp +++ b/cpp/arcticdb/entity/merge_descriptors.hpp @@ -6,9 +6,13 @@ */ #include -#include namespace arcticdb { +class Store; +namespace pipelines { + struct SliceAndKey; +} + StreamDescriptor merge_descriptors( const StreamDescriptor &original, const std::vector> &entries, diff --git a/cpp/arcticdb/entity/metrics.cpp b/cpp/arcticdb/entity/metrics.cpp index 1480e251a53..ac69330929e 100644 --- a/cpp/arcticdb/entity/metrics.cpp +++ b/cpp/arcticdb/entity/metrics.cpp @@ -6,13 +6,16 @@ */ #include +#include +#include #include -#include -#include -#include +#include +#include #ifdef _WIN32 -# include // for gethostname +#include // for gethostname +#else +#include // for gethostname #endif using namespace prometheus; diff --git a/cpp/arcticdb/entity/metrics.hpp b/cpp/arcticdb/entity/metrics.hpp index b3366048b0a..fecbb5c1319 100644 --- a/cpp/arcticdb/entity/metrics.hpp +++ b/cpp/arcticdb/entity/metrics.hpp @@ -7,26 +7,21 @@ #pragma once -#include -#include -#include -#include -#include -#include #include -#ifndef _WIN32 -#include -#include -#endif +namespace prometheus { + class Exposer; + class Gateway; +} -#include -#include -#include #include #include #include -#include +#include + +namespace prometheus { + class Summary; +} namespace arcticdb { diff --git a/cpp/arcticdb/entity/ref_key.hpp b/cpp/arcticdb/entity/ref_key.hpp index 57b3fc877cc..fd9bf61eea8 100644 --- a/cpp/arcticdb/entity/ref_key.hpp +++ b/cpp/arcticdb/entity/ref_key.hpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace arcticdb::entity { class RefKey { diff --git a/cpp/arcticdb/entity/types-inl.hpp b/cpp/arcticdb/entity/types-inl.hpp index 8c939a0aed5..33d5e19ee98 100644 --- a/cpp/arcticdb/entity/types-inl.hpp +++ b/cpp/arcticdb/entity/types-inl.hpp @@ -9,7 +9,6 @@ #error "This should only be included by types.hpp" #endif -#include #include #include diff --git a/cpp/arcticdb/entity/types.hpp b/cpp/arcticdb/entity/types.hpp index b158ae91a45..141030fe853 100644 --- a/cpp/arcticdb/entity/types.hpp +++ b/cpp/arcticdb/entity/types.hpp @@ -13,7 +13,6 @@ #include #include #include -#include #include diff --git a/cpp/arcticdb/log/log.cpp b/cpp/arcticdb/log/log.cpp index 205e3a91297..079c5118c22 100644 --- a/cpp/arcticdb/log/log.cpp +++ b/cpp/arcticdb/log/log.cpp @@ -14,18 +14,14 @@ #include #include #include -#include #include #include #include #include -#include - #include -#include #include #include diff --git a/cpp/arcticdb/pipeline/column_stats.hpp b/cpp/arcticdb/pipeline/column_stats.hpp index 94ebf7a4e5d..13a1d5d5bac 100644 --- a/cpp/arcticdb/pipeline/column_stats.hpp +++ b/cpp/arcticdb/pipeline/column_stats.hpp @@ -1,7 +1,6 @@ #pragma once #include -#include #include #include diff --git a/cpp/arcticdb/pipeline/frame_slice.hpp b/cpp/arcticdb/pipeline/frame_slice.hpp index 393ce7a862c..68c79170ef0 100644 --- a/cpp/arcticdb/pipeline/frame_slice.hpp +++ b/cpp/arcticdb/pipeline/frame_slice.hpp @@ -7,7 +7,6 @@ #pragma once -#include #include #include #include diff --git a/cpp/arcticdb/pipeline/frame_utils.cpp b/cpp/arcticdb/pipeline/frame_utils.cpp index b96fd3f5152..a01a9afa295 100644 --- a/cpp/arcticdb/pipeline/frame_utils.cpp +++ b/cpp/arcticdb/pipeline/frame_utils.cpp @@ -6,8 +6,9 @@ */ #include -#include #include +#include +#include namespace arcticdb { diff --git a/cpp/arcticdb/pipeline/frame_utils.hpp b/cpp/arcticdb/pipeline/frame_utils.hpp index c303c67c3d8..fc7f4add88f 100644 --- a/cpp/arcticdb/pipeline/frame_utils.hpp +++ b/cpp/arcticdb/pipeline/frame_utils.hpp @@ -8,24 +8,24 @@ #pragma once #include -#include #include #include #include -#include -#include -#include #include #include #include #include #include -#include +#include #include #include namespace arcticdb { +namespace pipelines::index { + struct IndexSegmentReader; +} + inline size_t get_first_string_size(const pipelines::PipelineContextRow& context_row, ChunkedBuffer &src, std::size_t first_row_in_frame) { auto offset = first_context_row(context_row.slice_and_key(), first_row_in_frame); auto num_rows = context_row.slice_and_key().slice_.row_range.diff(); diff --git a/cpp/arcticdb/pipeline/index_segment_reader.cpp b/cpp/arcticdb/pipeline/index_segment_reader.cpp index b55b6171446..2713496dc67 100644 --- a/cpp/arcticdb/pipeline/index_segment_reader.cpp +++ b/cpp/arcticdb/pipeline/index_segment_reader.cpp @@ -5,13 +5,10 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include -#include -#include #include -#include #include #include +#include using namespace arcticdb::entity; using namespace arcticdb::stream; diff --git a/cpp/arcticdb/pipeline/index_segment_reader.hpp b/cpp/arcticdb/pipeline/index_segment_reader.hpp index 63496e80fd1..9fc31891b9d 100644 --- a/cpp/arcticdb/pipeline/index_segment_reader.hpp +++ b/cpp/arcticdb/pipeline/index_segment_reader.hpp @@ -8,13 +8,7 @@ #pragma once #include -#include #include -#include - -#include - -#include namespace arcticdb { class Store; @@ -24,8 +18,10 @@ namespace arcticdb::pipelines { struct ReadQuery; } -namespace arcticdb::pipelines::index { + +namespace arcticdb::pipelines::index { +enum class Fields : uint32_t; struct IndexSegmentIterator; struct IndexSegmentReader { diff --git a/cpp/arcticdb/pipeline/pipeline_context.cpp b/cpp/arcticdb/pipeline/pipeline_context.cpp index 0b478426137..f66a44a6ff6 100644 --- a/cpp/arcticdb/pipeline/pipeline_context.cpp +++ b/cpp/arcticdb/pipeline/pipeline_context.cpp @@ -5,9 +5,8 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ +#include #include -#include -#include #include #include diff --git a/cpp/arcticdb/pipeline/pipeline_context.hpp b/cpp/arcticdb/pipeline/pipeline_context.hpp index e15f18dd764..cff5ff9d0e2 100644 --- a/cpp/arcticdb/pipeline/pipeline_context.hpp +++ b/cpp/arcticdb/pipeline/pipeline_context.hpp @@ -7,14 +7,10 @@ #pragma once -#include #include #include -#include -#include -#include #include diff --git a/cpp/arcticdb/pipeline/python_output_frame.cpp b/cpp/arcticdb/pipeline/python_output_frame.cpp index 797ef7da36d..3f09ec9ed9f 100644 --- a/cpp/arcticdb/pipeline/python_output_frame.cpp +++ b/cpp/arcticdb/pipeline/python_output_frame.cpp @@ -7,7 +7,6 @@ #include #include -#include #include namespace arcticdb::pipelines { diff --git a/cpp/arcticdb/pipeline/python_output_frame.hpp b/cpp/arcticdb/pipeline/python_output_frame.hpp index c8164e713e0..2a255b01740 100644 --- a/cpp/arcticdb/pipeline/python_output_frame.hpp +++ b/cpp/arcticdb/pipeline/python_output_frame.hpp @@ -8,7 +8,6 @@ #pragma once #include -#include namespace arcticdb::pipelines { diff --git a/cpp/arcticdb/pipeline/query.hpp b/cpp/arcticdb/pipeline/query.hpp index 5d20744500b..9f09dd60043 100644 --- a/cpp/arcticdb/pipeline/query.hpp +++ b/cpp/arcticdb/pipeline/query.hpp @@ -9,16 +9,9 @@ #include #include -#include -#include -#include -#include #include -#include #include #include -#include -#include #include #include #include @@ -134,8 +127,8 @@ inline bool is_column_selected(size_t start_col, size_t end_col, const util::Bit inline FilterQuery create_static_col_filter(util::BitSet &&selected_columns) { return [sc = std::move(selected_columns)](const index::IndexSegmentReader &isr, std::unique_ptr&& input) mutable { auto res = std::make_unique(static_cast(isr.size())); - auto start_col = isr.column(index::Fields::start_col).begin(); - auto end_col = isr.column(index::Fields::end_col).begin(); + auto start_col = isr.column(arcticdb::pipelines::index::Fields::start_col).begin(); + auto end_col = isr.column(arcticdb::pipelines::index::Fields::end_col).begin(); if (input) { bm::bvector<>::enumerator en = input->first(); @@ -276,14 +269,14 @@ inline FilterQuery create_index_filter(const IndexRange &range, b switch (index_type.value()) { case IndexDescriptor::TIMESTAMP: { - return build_bitset_for_index(container, + return build_bitset_for_index(container, rg, dynamic_schema, column_groups, std::move(input)); } case IndexDescriptor::STRING: { - return build_bitset_for_index(container, rg, dynamic_schema, column_groups, std::move(input)); + return build_bitset_for_index(container, rg, dynamic_schema, column_groups, std::move(input)); } default:util::raise_rte("Unknown index type {} in create_index_filter", uint32_t(index_type.value())); } diff --git a/cpp/arcticdb/pipeline/read_frame.cpp b/cpp/arcticdb/pipeline/read_frame.cpp index 7fc44cd37c0..84d8aa0083e 100644 --- a/cpp/arcticdb/pipeline/read_frame.cpp +++ b/cpp/arcticdb/pipeline/read_frame.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -20,15 +19,15 @@ #include #include #include -#include #include #include #include #include #include -#include -#include +#include #include +#include +#include namespace arcticdb::pipelines { @@ -490,9 +489,9 @@ void decode_into_frame_dynamic( // decode_or_expand will invoke the empty type handler which will do backfilling with the default value depending on the // destination type. if (!trivially_compatible_types(m.source_type_desc_, m.dest_type_desc_) && !source_is_empty) { - m.dest_type_desc_.visit_tag([&buffer, &m, &data, encoded_field, buffers, encdoing_version] (auto dest_desc_tag) { + m.dest_type_desc_.visit_tag([&buffer, &m, buffers] (auto dest_desc_tag) { using DestinationType = typename decltype(dest_desc_tag)::DataTypeTag::raw_type; - m.source_type_desc_.visit_tag([&buffer, &m, &data, &encoded_field, &buffers, encdoing_version] (auto src_desc_tag ) { + m.source_type_desc_.visit_tag([&buffer, &m] (auto src_desc_tag ) { using SourceType = typename decltype(src_desc_tag)::DataTypeTag::raw_type; if constexpr(std::is_arithmetic_v && std::is_arithmetic_v) { // If the source and destination types are different, then sizeof(destination type) >= sizeof(source type) diff --git a/cpp/arcticdb/pipeline/read_frame.hpp b/cpp/arcticdb/pipeline/read_frame.hpp index d0c28348b86..d3cfededa63 100644 --- a/cpp/arcticdb/pipeline/read_frame.hpp +++ b/cpp/arcticdb/pipeline/read_frame.hpp @@ -7,21 +7,22 @@ #pragma once -#include -#include -#include #include - #include - +#include #include namespace arcticdb { struct BufferHolder; + struct ReadOptions; + namespace stream { + struct StreamSource; + } } namespace arcticdb::pipelines { - +struct PipelineContext; +struct PipelineContextRow; SegmentInMemory allocate_frame(const std::shared_ptr& context); template @@ -38,7 +39,7 @@ std::optional check_and_mark_slices( bool is_first = true; size_t count = 0u; - std::set row_ranges; + std::set row_ranges; for (auto[opt_seg, slice, key] : slice_and_keys) { is_first = row_ranges.insert(slice.row_range).second; if(return_bitset) { @@ -54,7 +55,7 @@ std::optional check_and_mark_slices( if(!row_ranges.empty()) { auto pos = row_ranges.begin(); - RowRange current = *pos; + arcticdb::pipelines::RowRange current = *pos; std::advance(pos, 1); for(; pos != row_ranges.end(); ++pos){ sorting::check(pos->start() == current.end(), "Non-contiguous rows, range search on unsorted data? {} {}", current, *pos); diff --git a/cpp/arcticdb/pipeline/slicing.hpp b/cpp/arcticdb/pipeline/slicing.hpp index 612b7036763..d0f2d6357b6 100644 --- a/cpp/arcticdb/pipeline/slicing.hpp +++ b/cpp/arcticdb/pipeline/slicing.hpp @@ -7,23 +7,19 @@ #pragma once -#include -#include #include #include -#include -#include #include -#include #include -#include - -#include #include #include #include +namespace arcticdb{ + struct WriteOptions; +} + namespace arcticdb::pipelines { class FixedSlicer { diff --git a/cpp/arcticdb/pipeline/string_pool_utils.cpp b/cpp/arcticdb/pipeline/string_pool_utils.cpp index ffbe509af7f..9230c017b79 100644 --- a/cpp/arcticdb/pipeline/string_pool_utils.cpp +++ b/cpp/arcticdb/pipeline/string_pool_utils.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include namespace arcticdb { size_t first_context_row(const pipelines::SliceAndKey& slice_and_key, size_t first_row_in_frame) { diff --git a/cpp/arcticdb/pipeline/test/test_pipeline.cpp b/cpp/arcticdb/pipeline/test/test_pipeline.cpp index 0c263c068db..ae7e2313ea4 100644 --- a/cpp/arcticdb/pipeline/test/test_pipeline.cpp +++ b/cpp/arcticdb/pipeline/test/test_pipeline.cpp @@ -9,16 +9,10 @@ #include #include -#include #include -#include -#include #include -#include #include #include -#include -#include namespace arcticdb { diff --git a/cpp/arcticdb/pipeline/value.hpp b/cpp/arcticdb/pipeline/value.hpp index 7d9e20153c7..fa61550ca03 100644 --- a/cpp/arcticdb/pipeline/value.hpp +++ b/cpp/arcticdb/pipeline/value.hpp @@ -8,6 +8,7 @@ #pragma once #include +#include namespace arcticdb { diff --git a/cpp/arcticdb/pipeline/write_frame.cpp b/cpp/arcticdb/pipeline/write_frame.cpp index 6b702048230..9d310743628 100644 --- a/cpp/arcticdb/pipeline/write_frame.cpp +++ b/cpp/arcticdb/pipeline/write_frame.cpp @@ -5,27 +5,18 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include #include -#include #include #include #include #include #include -#include #include #include #include -#include -#include #include -#include #include #include -#include -#include -#include #include #include #include diff --git a/cpp/arcticdb/pipeline/write_frame.hpp b/cpp/arcticdb/pipeline/write_frame.hpp index ea3cb4259fd..1d3d3eae229 100644 --- a/cpp/arcticdb/pipeline/write_frame.hpp +++ b/cpp/arcticdb/pipeline/write_frame.hpp @@ -7,17 +7,13 @@ #pragma once -#include -#include #include #include #include #include #include -#include -#include namespace arcticdb::pipelines { diff --git a/cpp/arcticdb/processing/aggregation.cpp b/cpp/arcticdb/processing/aggregation.cpp index 2d27449960f..d26c262e2b3 100644 --- a/cpp/arcticdb/processing/aggregation.cpp +++ b/cpp/arcticdb/processing/aggregation.cpp @@ -6,7 +6,7 @@ */ #include - +#include #include namespace arcticdb @@ -72,13 +72,20 @@ namespace } } - inline util::BitMagic::enumerator::value_type deref(util::BitMagic::enumerator iter) { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunused-function" + #endif + static inline util::BitMagic::enumerator::value_type deref(util::BitMagic::enumerator iter) { return *iter; } - inline std::size_t deref(std::size_t index) { + static inline std::size_t deref(std::size_t index) { return index; } + #if defined(__clang__) + #pragma clang diagnostic pop + #endif template struct OutputType; diff --git a/cpp/arcticdb/processing/aggregation.hpp b/cpp/arcticdb/processing/aggregation.hpp index 468774f6b43..67b8b9c8dae 100644 --- a/cpp/arcticdb/processing/aggregation.hpp +++ b/cpp/arcticdb/processing/aggregation.hpp @@ -8,8 +8,6 @@ #pragma once #include -#include -#include #include namespace arcticdb { diff --git a/cpp/arcticdb/processing/clause.cpp b/cpp/arcticdb/processing/clause.cpp index 8e4a050a0c2..943eec5dbcf 100644 --- a/cpp/arcticdb/processing/clause.cpp +++ b/cpp/arcticdb/processing/clause.cpp @@ -17,10 +17,12 @@ #include #include -#include #include -#include #include +#include +#include +#include +#include namespace arcticdb { @@ -33,9 +35,9 @@ std::vector> structure_by_row_slice(std::vector> res; - RowRange previous_row_range; + pipelines::RowRange previous_row_range; for (const auto& [idx, ranges_and_key]: folly::enumerate(ranges_and_keys)) { - RowRange current_row_range{ranges_and_key.row_range_}; + pipelines::RowRange current_row_range{ranges_and_key.row_range_}; if (current_row_range != previous_row_range) { res.emplace_back(); } @@ -50,9 +52,9 @@ std::vector> structure_by_column_slice(std::vector> res; - ColRange previous_col_range; + pipelines::ColRange previous_col_range; for (const auto& [idx, ranges_and_key]: folly::enumerate(ranges_and_keys)) { - ColRange current_col_range{ranges_and_key.col_range_}; + pipelines::ColRange current_col_range{ranges_and_key.col_range_}; if (current_col_range != previous_col_range) { res.emplace_back(); } @@ -77,15 +79,15 @@ Composite gather_entities(std::shared_ptr comp (const EntityIds& entity_ids) -> ProcessingUnit { ProcessingUnit res; std::vector> segments; - std::vector> row_ranges; - std::vector> col_ranges; + std::vector> row_ranges; + std::vector> col_ranges; segments.reserve(entity_ids.size()); row_ranges.reserve(entity_ids.size()); col_ranges.reserve(entity_ids.size()); for (auto entity_id: entity_ids) { segments.emplace_back(component_manager->get>(entity_id)); - row_ranges.emplace_back(component_manager->get>(entity_id)); - col_ranges.emplace_back(component_manager->get>(entity_id)); + row_ranges.emplace_back(component_manager->get>(entity_id)); + col_ranges.emplace_back(component_manager->get>(entity_id)); } res.set_segments(std::move(segments)); res.set_row_ranges(std::move(row_ranges)); @@ -556,8 +558,8 @@ Composite AggregationClause::process(Composite&& entity_id } if (output_seg.has_value()) { output.push_back(push_entities(component_manager_, ProcessingUnit(std::move(*output_seg), - RowRange{min_start_row, max_end_row}, - ColRange{min_start_col, max_end_col}))); + pipelines::RowRange{min_start_row, max_end_row}, + pipelines::ColRange{min_start_col, max_end_col}))); } }); return output; @@ -575,7 +577,7 @@ Composite SplitClause::process(Composite&& entity_ids) con for (auto&& split_seg : split_segs) { end_row = start_row + split_seg.row_count(); ret.push_back(push_entities(component_manager_, ProcessingUnit(std::move(split_seg), - RowRange(start_row, end_row), + pipelines::RowRange(start_row, end_row), std::move(*proc.col_ranges_->at(idx))))); start_row = end_row; } @@ -605,8 +607,8 @@ void merge_impl( QueueType &input_streams, bool add_symbol_column, StreamId stream_id, - const RowRange& row_range, - const ColRange& col_range, + const pipelines::RowRange& row_range, + const pipelines::ColRange& col_range, IndexType index, const StreamDescriptor& stream_descriptor) { auto num_segment_rows = ConfigsMap::instance()->get_int("Merge.SegmentSize", 100000); @@ -669,8 +671,8 @@ Composite MergeClause::process(Composite&& entity_ids) con input_streams.push(std::make_unique(std::move(*segment))); } }); - const RowRange row_range{min_start_row, max_end_row}; - const ColRange col_range{min_start_col, max_end_col}; + const pipelines::RowRange row_range{min_start_row, max_end_row}; + const pipelines::ColRange col_range{min_start_col, max_end_col}; Composite ret; std::visit( [this, &ret, &input_streams, &comp=compare, stream_id=stream_id_, &row_range, &col_range](auto idx, auto density) { diff --git a/cpp/arcticdb/processing/clause.hpp b/cpp/arcticdb/processing/clause.hpp index d646740fe8d..cfba4ae1ed5 100644 --- a/cpp/arcticdb/processing/clause.hpp +++ b/cpp/arcticdb/processing/clause.hpp @@ -7,32 +7,21 @@ #pragma once -#include -#include #include -#include #include #include #include -#include #include #include -#include #include -#include -#include -#include #include #include -#include #include #include #include -#include #include -#include namespace arcticdb { diff --git a/cpp/arcticdb/processing/component_manager.hpp b/cpp/arcticdb/processing/component_manager.hpp index 859d996e974..d4c405dd034 100644 --- a/cpp/arcticdb/processing/component_manager.hpp +++ b/cpp/arcticdb/processing/component_manager.hpp @@ -9,13 +9,25 @@ #include #include +#include +#include -#include +#include +#include #include namespace arcticdb { +class SegmentInMemory; -using namespace pipelines; +namespace pipelines { + struct RowRange; + struct ColRange; +} + +namespace entity { + class AtomKeyImpl; +} +using AtomKey = entity::AtomKeyImpl; using EntityId = uint64_t; using bucket_id = size_t; @@ -31,9 +43,9 @@ class ComponentManager { auto insertion_id = entity_id(id); if constexpr(std::is_same_v>) { segment_map_.add(insertion_id, std::move(component), expected_get_calls); - } else if constexpr(std::is_same_v>) { + } else if constexpr(std::is_same_v>) { row_range_map_.add(insertion_id, std::move(component)); - } else if constexpr(std::is_same_v>) { + } else if constexpr(std::is_same_v>) { col_range_map_.add(insertion_id, std::move(component)); } else if constexpr(std::is_same_v>) { atom_key_map_.add(insertion_id, std::move(component)); @@ -51,9 +63,9 @@ class ComponentManager { T get(EntityId id) { if constexpr(std::is_same_v>) { return segment_map_.get(id); - } else if constexpr(std::is_same_v>) { + } else if constexpr(std::is_same_v>) { return row_range_map_.get(id); - } else if constexpr(std::is_same_v>) { + } else if constexpr(std::is_same_v>) { return col_range_map_.get(id); } else if constexpr(std::is_same_v>) { return atom_key_map_.get(id); @@ -125,8 +137,8 @@ class ComponentManager { }; ComponentMap> segment_map_{"segment", true}; - ComponentMap> row_range_map_{"row range", false}; - ComponentMap> col_range_map_{"col range", false}; + ComponentMap> row_range_map_{"row range", false}; + ComponentMap> col_range_map_{"col range", false}; ComponentMap> atom_key_map_{"atom key", false}; ComponentMap bucket_map_{"bucket", false}; diff --git a/cpp/arcticdb/processing/operation_dispatch.cpp b/cpp/arcticdb/processing/operation_dispatch.cpp index 3dd0558732b..edff103ae79 100644 --- a/cpp/arcticdb/processing/operation_dispatch.cpp +++ b/cpp/arcticdb/processing/operation_dispatch.cpp @@ -7,6 +7,7 @@ */ #include +#include namespace arcticdb { diff --git a/cpp/arcticdb/processing/operation_dispatch.hpp b/cpp/arcticdb/processing/operation_dispatch.hpp index 870b384958c..53101e8345d 100644 --- a/cpp/arcticdb/processing/operation_dispatch.hpp +++ b/cpp/arcticdb/processing/operation_dispatch.hpp @@ -7,23 +7,9 @@ */ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include namespace arcticdb { diff --git a/cpp/arcticdb/processing/operation_dispatch_binary.cpp b/cpp/arcticdb/processing/operation_dispatch_binary.cpp index 41fd2d9d5c9..5eadd1c2e6c 100644 --- a/cpp/arcticdb/processing/operation_dispatch_binary.cpp +++ b/cpp/arcticdb/processing/operation_dispatch_binary.cpp @@ -9,6 +9,67 @@ #include namespace arcticdb { +template +VariantData visit_binary_comparator(const VariantData& left, const VariantData& right, Func&& func) { + if(std::holds_alternative(left) || std::holds_alternative(right)) + return EmptyResult{}; + + return std::visit(util::overload { + [&func] (const ColumnWithStrings& l, const std::shared_ptr& r) ->VariantData { + auto result = binary_comparator(l, *r, std::forward(func)); + return transform_to_placeholder(result); + }, + [&] (const ColumnWithStrings& l, const ColumnWithStrings& r) ->VariantData { + auto result = binary_comparator(l, r, std::forward(func)); + return transform_to_placeholder(result); + }, + [&](const std::shared_ptr& l, const ColumnWithStrings& r) ->VariantData { + auto result = binary_comparator(r, *l, std::forward(func)); + return transform_to_placeholder(result); + }, + [&] ([[maybe_unused]] const std::shared_ptr& l, [[maybe_unused]] const std::shared_ptr& r) ->VariantData { + util::raise_rte("Two value inputs not accepted to binary comparators"); + }, + [](const auto &, const auto&) -> VariantData { + util::raise_rte("Bitset/ValueSet inputs not accepted to binary comparators"); + } + }, left, right); +} +template VariantData visit_binary_comparator(const VariantData&, const VariantData&, EqualsOperator&&); +template VariantData visit_binary_comparator(const VariantData&, const VariantData&, NotEqualsOperator&&); +template VariantData visit_binary_comparator(const VariantData&, const VariantData&, LessThanOperator&&); +template VariantData visit_binary_comparator(const VariantData&, const VariantData&, LessThanEqualsOperator&&); +template VariantData visit_binary_comparator(const VariantData&, const VariantData&, GreaterThanOperator&&); +template VariantData visit_binary_comparator(const VariantData&, const VariantData&, GreaterThanEqualsOperator&&); + +template +VariantData visit_binary_operator(const VariantData& left, const VariantData& right, Func&& func) { + if(std::holds_alternative(left) || std::holds_alternative(right)) + return EmptyResult{}; + + return std::visit(util::overload { + [&] (const ColumnWithStrings& l, const std::shared_ptr& r) ->VariantData { + return binary_operator(*(l.column_), *r, std::forward(func)); + }, + [&] (const ColumnWithStrings& l, const ColumnWithStrings& r) ->VariantData { + return binary_operator(*(l.column_), *(r.column_), std::forward(func)); + }, + [&](const std::shared_ptr& l, const ColumnWithStrings& r) ->VariantData { + return binary_operator(*(r.column_), *l, std::forward(func)); + }, + [&] (const std::shared_ptr& l, const std::shared_ptr& r) -> VariantData { + return binary_operator(*l, *r, std::forward(func)); + }, + [](const auto &, const auto&) -> VariantData { + util::raise_rte("Bitset/ValueSet inputs not accepted to binary operators"); + } + }, left, right); +} + +template VariantData visit_binary_operator(const VariantData&, const VariantData&, PlusOperator&&); +template VariantData visit_binary_operator(const VariantData&, const VariantData&, MinusOperator&&); +template VariantData visit_binary_operator(const VariantData&, const VariantData&, TimesOperator&&); +template VariantData visit_binary_operator(const VariantData&, const VariantData&, DivideOperator&&); VariantData binary_boolean(const util::BitSet& left, const util::BitSet& right, OperationType operation) { util::check(left.size() == right.size(), "BitSets of different lengths ({} and {}) in binary comparator", left.size(), right.size()); diff --git a/cpp/arcticdb/processing/operation_dispatch_binary.hpp b/cpp/arcticdb/processing/operation_dispatch_binary.hpp index fa047931a51..86efba9777f 100644 --- a/cpp/arcticdb/processing/operation_dispatch_binary.hpp +++ b/cpp/arcticdb/processing/operation_dispatch_binary.hpp @@ -8,24 +8,20 @@ #pragma once -#include #include #include #include -#include #include #include #include -#include #include #include -#include #include #include #include - +#include namespace arcticdb { VariantData binary_boolean(const util::BitSet& left, const util::BitSet& right, OperationType operation); @@ -247,31 +243,7 @@ VariantData binary_comparator(const ColumnWithStrings& column_with_strings, cons } template -VariantData visit_binary_comparator(const VariantData& left, const VariantData& right, Func&& func) { - if(std::holds_alternative(left) || std::holds_alternative(right)) - return EmptyResult{}; - - return std::visit(util::overload { - [&func] (const ColumnWithStrings& l, const std::shared_ptr& r) ->VariantData { - auto result = binary_comparator(l, *r, std::forward(func)); - return transform_to_placeholder(result); - }, - [&] (const ColumnWithStrings& l, const ColumnWithStrings& r) ->VariantData { - auto result = binary_comparator(l, r, std::forward(func)); - return transform_to_placeholder(result); - }, - [&](const std::shared_ptr& l, const ColumnWithStrings& r) ->VariantData { - auto result = binary_comparator(r, *l, std::forward(func)); - return transform_to_placeholder(result); - }, - [&] ([[maybe_unused]] const std::shared_ptr& l, [[maybe_unused]] const std::shared_ptr& r) ->VariantData { - util::raise_rte("Two value inputs not accepted to binary comparators"); - }, - [](const auto &, const auto&) -> VariantData { - util::raise_rte("Bitset/ValueSet inputs not accepted to binary comparators"); - } - }, left, right); -} +VariantData visit_binary_comparator(const VariantData& left, const VariantData& right, Func&& func); template VariantData binary_operator(const Value& left, const Value& right, Func&& func) { @@ -374,53 +346,8 @@ VariantData binary_operator(const Column& col, const Value& val, Func&& func) { } template -VariantData visit_binary_operator(const VariantData& left, const VariantData& right, Func&& func) { - if(std::holds_alternative(left) || std::holds_alternative(right)) - return EmptyResult{}; - - return std::visit(util::overload { - [&] (const ColumnWithStrings& l, const std::shared_ptr& r) ->VariantData { - return binary_operator(*(l.column_), *r, std::forward(func)); - }, - [&] (const ColumnWithStrings& l, const ColumnWithStrings& r) ->VariantData { - return binary_operator(*(l.column_), *(r.column_), std::forward(func)); - }, - [&](const std::shared_ptr& l, const ColumnWithStrings& r) ->VariantData { - return binary_operator(*(r.column_), *l, std::forward(func)); - }, - [&] (const std::shared_ptr& l, const std::shared_ptr& r) -> VariantData { - return binary_operator(*l, *r, std::forward(func)); - }, - [](const auto &, const auto&) -> VariantData { - util::raise_rte("Bitset/ValueSet inputs not accepted to binary operators"); - } - }, left, right); -} +VariantData visit_binary_operator(const VariantData& left, const VariantData& right, Func&& func); VariantData dispatch_binary(const VariantData& left, const VariantData& right, OperationType operation); -// instantiated in operation_dispatch_binary_operator.cpp to reduce compilation memory use -extern template -VariantData visit_binary_operator(const VariantData&, const VariantData&, PlusOperator&&); -extern template -VariantData visit_binary_operator(const VariantData&, const VariantData&, MinusOperator&&); -extern template -VariantData visit_binary_operator(const VariantData&, const VariantData&, TimesOperator&&); -extern template -VariantData visit_binary_operator(const VariantData&, const VariantData&, DivideOperator&&); - -// instantiated in operation_dispatch_binary_comparator.cpp to reduce compilation memory use -extern template -VariantData visit_binary_comparator(const VariantData&, const VariantData&, EqualsOperator&&); -extern template -VariantData visit_binary_comparator(const VariantData&, const VariantData&, NotEqualsOperator&&); -extern template -VariantData visit_binary_comparator(const VariantData&, const VariantData&, LessThanOperator&&); -extern template -VariantData visit_binary_comparator(const VariantData&, const VariantData&, LessThanEqualsOperator&&); -extern template -VariantData visit_binary_comparator(const VariantData&, const VariantData&, GreaterThanOperator&&); -extern template -VariantData visit_binary_comparator(const VariantData&, const VariantData&, GreaterThanEqualsOperator&&); - } diff --git a/cpp/arcticdb/processing/operation_dispatch_binary_eq.cpp b/cpp/arcticdb/processing/operation_dispatch_binary_eq.cpp deleted file mode 100644 index 7114ec36ab4..00000000000 --- a/cpp/arcticdb/processing/operation_dispatch_binary_eq.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2023 Man Group Operations Limited - * - * Use of this software is governed by the Business Source License 1.1 included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. - */ - -#include - -namespace arcticdb { - -template VariantData visit_binary_comparator(const VariantData&, const VariantData&, EqualsOperator&&); -template VariantData visit_binary_comparator(const VariantData&, const VariantData&, NotEqualsOperator&&); - -} diff --git a/cpp/arcticdb/processing/operation_dispatch_binary_gt.cpp b/cpp/arcticdb/processing/operation_dispatch_binary_gt.cpp deleted file mode 100644 index 6cf80de4070..00000000000 --- a/cpp/arcticdb/processing/operation_dispatch_binary_gt.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2023 Man Group Operations Limited - * - * Use of this software is governed by the Business Source License 1.1 included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. - */ - -#include - -namespace arcticdb { - -template VariantData visit_binary_comparator(const VariantData&, const VariantData&, GreaterThanOperator&&); -template VariantData visit_binary_comparator(const VariantData&, const VariantData&, GreaterThanEqualsOperator&&); - -} diff --git a/cpp/arcticdb/processing/operation_dispatch_binary_lt.cpp b/cpp/arcticdb/processing/operation_dispatch_binary_lt.cpp deleted file mode 100644 index 66cdb48cea8..00000000000 --- a/cpp/arcticdb/processing/operation_dispatch_binary_lt.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2023 Man Group Operations Limited - * - * Use of this software is governed by the Business Source License 1.1 included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. - */ - -#include - -namespace arcticdb { - -template VariantData visit_binary_comparator(const VariantData&, const VariantData&, LessThanOperator&&); -template VariantData visit_binary_comparator(const VariantData&, const VariantData&, LessThanEqualsOperator&&); - -} diff --git a/cpp/arcticdb/processing/operation_dispatch_binary_operator.cpp b/cpp/arcticdb/processing/operation_dispatch_binary_operator.cpp deleted file mode 100644 index ca69dd619be..00000000000 --- a/cpp/arcticdb/processing/operation_dispatch_binary_operator.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2023 Man Group Operations Limited - * - * Use of this software is governed by the Business Source License 1.1 included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. - */ - -#include - -namespace arcticdb { - -template VariantData visit_binary_operator(const VariantData&, const VariantData&, PlusOperator&&); -template VariantData visit_binary_operator(const VariantData&, const VariantData&, MinusOperator&&); -template VariantData visit_binary_operator(const VariantData&, const VariantData&, TimesOperator&&); -template VariantData visit_binary_operator(const VariantData&, const VariantData&, DivideOperator&&); - -} \ No newline at end of file diff --git a/cpp/arcticdb/processing/operation_dispatch_unary.hpp b/cpp/arcticdb/processing/operation_dispatch_unary.hpp index c8018d7ba6a..587e4e9ea75 100644 --- a/cpp/arcticdb/processing/operation_dispatch_unary.hpp +++ b/cpp/arcticdb/processing/operation_dispatch_unary.hpp @@ -8,23 +8,17 @@ #pragma once -#include #include #include #include -#include #include -#include #include -#include #include #include -#include #include #include -#include namespace arcticdb { @@ -115,7 +109,7 @@ VariantData unary_comparator(const Column& col, Func&& func) { constexpr auto sparse_missing_value_output = std::is_same_v; details::visit_type(col.type().data_type(), [&](auto col_tag) { using type_info = ScalarTypeInfo; - Column::transform(col, output_bitset, sparse_missing_value_output, [&func](auto input_value) -> bool { + Column::transform(col, output_bitset, sparse_missing_value_output, [&](auto input_value) -> bool { if constexpr (is_floating_point_type(type_info::data_type)) { return func.apply(input_value); } else if constexpr (is_sequence_type(type_info::data_type)) { diff --git a/cpp/arcticdb/processing/processing_unit.cpp b/cpp/arcticdb/processing/processing_unit.cpp index 2430022b6cf..ee464a70f52 100644 --- a/cpp/arcticdb/processing/processing_unit.cpp +++ b/cpp/arcticdb/processing/processing_unit.cpp @@ -6,6 +6,7 @@ */ #include +#include namespace arcticdb { diff --git a/cpp/arcticdb/processing/processing_unit.hpp b/cpp/arcticdb/processing/processing_unit.hpp index eb7f6494d62..909bd041739 100644 --- a/cpp/arcticdb/processing/processing_unit.hpp +++ b/cpp/arcticdb/processing/processing_unit.hpp @@ -15,15 +15,13 @@ #include #include #include -#include #include #include #include #include -#include -#include namespace arcticdb { + struct ExpressionContext; enum class PipelineOptimisation : uint8_t { SPEED, MEMORY @@ -61,8 +59,8 @@ namespace arcticdb { std::optional&& row_range=std::nullopt, std::optional&& col_range=std::nullopt) { auto segment_in_memory = std::move(seg); - auto rows = row_range.value_or(RowRange(0, segment_in_memory.row_count())); - auto cols = col_range.value_or(ColRange(0, segment_in_memory.is_null() ? 0 : segment_in_memory.descriptor().field_count() - segment_in_memory.descriptor().index().field_count())); + auto rows = row_range.value_or(pipelines::RowRange(0, segment_in_memory.row_count())); + auto cols = col_range.value_or(pipelines::ColRange(0, segment_in_memory.is_null() ? 0 : segment_in_memory.descriptor().field_count() - segment_in_memory.descriptor().index().field_count())); segments_.emplace({std::make_shared(std::move(segment_in_memory))}); row_ranges_.emplace({std::make_shared(std::move(rows))}); col_ranges_.emplace({std::make_shared(std::move(cols))}); diff --git a/cpp/arcticdb/processing/test/benchmark_clause.cpp b/cpp/arcticdb/processing/test/benchmark_clause.cpp index 616ee3253e3..f7177d570c3 100644 --- a/cpp/arcticdb/processing/test/benchmark_clause.cpp +++ b/cpp/arcticdb/processing/test/benchmark_clause.cpp @@ -10,11 +10,10 @@ #include #include -#include #include -#include -#include - +#include +#include +#include using namespace arcticdb; // run like: --benchmark_time_unit=ms --benchmark_filter=.* --benchmark_min_time=5x diff --git a/cpp/arcticdb/processing/test/test_clause.cpp b/cpp/arcticdb/processing/test/test_clause.cpp index 62399fa3ae6..e3673afb42f 100644 --- a/cpp/arcticdb/processing/test/test_clause.cpp +++ b/cpp/arcticdb/processing/test/test_clause.cpp @@ -6,11 +6,11 @@ */ #include -#include #include #include -#include #include +#include +#include template void segment_scalar_assert_all_values_equal(const arcticdb::ProcessingUnit& proc_unit, const arcticdb::ColumnName& name, const std::unordered_set& expected, size_t expected_row_count) { diff --git a/cpp/arcticdb/processing/test/test_component_manager.cpp b/cpp/arcticdb/processing/test/test_component_manager.cpp index 181e060435e..bf27d3f0002 100644 --- a/cpp/arcticdb/processing/test/test_component_manager.cpp +++ b/cpp/arcticdb/processing/test/test_component_manager.cpp @@ -8,6 +8,9 @@ #include #include +#include +#include +#include using namespace arcticdb; using namespace arcticdb::pipelines; @@ -15,15 +18,15 @@ using namespace arcticdb::pipelines; TEST(ComponentManager, Simple) { ComponentManager component_manager; auto segment_0 = std::make_shared(); - auto row_range_0 = std::make_shared(0, 10); - auto col_range_0 = std::make_shared(10, 20); - auto key_0 = std::make_shared(AtomKeyBuilder().version_id(1).build("symbol_0", KeyType::TABLE_DATA)); + auto row_range_0 = std::make_shared(0, 10); + auto col_range_0 = std::make_shared(10, 20); + auto key_0 = std::make_shared(arcticdb::entity::AtomKeyBuilder().version_id(1).build("symbol_0", arcticdb::entity::KeyType::TABLE_DATA)); uint64_t expected_get_calls_0{1}; auto segment_1 = std::make_shared(); - auto row_range_1 = std::make_shared(20, 30); - auto col_range_1 = std::make_shared(30, 40); - auto key_1 = std::make_shared(AtomKeyBuilder().version_id(2).build("symbol_1", KeyType::TABLE_DATA)); + auto row_range_1 = std::make_shared(20, 30); + auto col_range_1 = std::make_shared(30, 40); + auto key_1 = std::make_shared(arcticdb::entity::AtomKeyBuilder().version_id(2).build("symbol_1", arcticdb::entity::KeyType::TABLE_DATA)); uint64_t expected_get_calls_1{2}; auto id_0 = component_manager.add(segment_0, std::nullopt, expected_get_calls_0); diff --git a/cpp/arcticdb/processing/test/test_has_valid_type_promotion.cpp b/cpp/arcticdb/processing/test/test_has_valid_type_promotion.cpp index 4c0689a3280..551a4298179 100644 --- a/cpp/arcticdb/processing/test/test_has_valid_type_promotion.cpp +++ b/cpp/arcticdb/processing/test/test_has_valid_type_promotion.cpp @@ -6,8 +6,8 @@ */ #include -#include #include +#include TEST(HasValidTypePromotion, DifferentDimensions) { using namespace arcticdb; diff --git a/cpp/arcticdb/python/normalization_checks.cpp b/cpp/arcticdb/python/normalization_checks.cpp index 109c3b4acc5..d0812b45bd4 100644 --- a/cpp/arcticdb/python/normalization_checks.cpp +++ b/cpp/arcticdb/python/normalization_checks.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/cpp/arcticdb/python/python_handlers.cpp b/cpp/arcticdb/python/python_handlers.cpp index 4e9aca7f33c..5351f653bc1 100644 --- a/cpp/arcticdb/python/python_handlers.cpp +++ b/cpp/arcticdb/python/python_handlers.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace arcticdb { diff --git a/cpp/arcticdb/python/python_handlers.hpp b/cpp/arcticdb/python/python_handlers.hpp index 186c87cbd96..df0d0546034 100644 --- a/cpp/arcticdb/python/python_handlers.hpp +++ b/cpp/arcticdb/python/python_handlers.hpp @@ -5,12 +5,14 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ #pragma once - -#include -#include +#include +#include +#include namespace arcticdb { struct ColumnMapping; + struct BufferHolder; + enum class EncodingVersion : uint16_t; struct EmptyHandler { /// @see arcticdb::ITypeHandler diff --git a/cpp/arcticdb/python/python_module.cpp b/cpp/arcticdb/python/python_module.cpp index cb8be77a8dd..1f817c2b692 100644 --- a/cpp/arcticdb/python/python_module.cpp +++ b/cpp/arcticdb/python/python_module.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/cpp/arcticdb/python/python_to_tensor_frame.cpp b/cpp/arcticdb/python/python_to_tensor_frame.cpp index fce30d30208..9ee82e82a50 100644 --- a/cpp/arcticdb/python/python_to_tensor_frame.cpp +++ b/cpp/arcticdb/python/python_to_tensor_frame.cpp @@ -7,12 +7,11 @@ #include -#include +#include #include #include #include #include -#include #include namespace arcticdb::convert { diff --git a/cpp/arcticdb/python/python_to_tensor_frame.hpp b/cpp/arcticdb/python/python_to_tensor_frame.hpp index 4ff566262a9..61e54645e94 100644 --- a/cpp/arcticdb/python/python_to_tensor_frame.hpp +++ b/cpp/arcticdb/python/python_to_tensor_frame.hpp @@ -7,12 +7,14 @@ #pragma once -#include -#include #include #include #include +namespace arcticdb { + class ScopedGILLock; +} + namespace arcticdb::convert { namespace py = pybind11; diff --git a/cpp/arcticdb/storage/azure/azure_mock_client.cpp b/cpp/arcticdb/storage/azure/azure_mock_client.cpp index efafb98bd99..64f5a972b70 100644 --- a/cpp/arcticdb/storage/azure/azure_mock_client.cpp +++ b/cpp/arcticdb/storage/azure/azure_mock_client.cpp @@ -5,14 +5,10 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include -#include -#include -#include #include #include -#include +#include namespace arcticdb::storage::azure { diff --git a/cpp/arcticdb/storage/azure/azure_mock_client.hpp b/cpp/arcticdb/storage/azure/azure_mock_client.hpp index 147324f61e7..9a20aa58fc8 100644 --- a/cpp/arcticdb/storage/azure/azure_mock_client.hpp +++ b/cpp/arcticdb/storage/azure/azure_mock_client.hpp @@ -7,14 +7,12 @@ #pragma once -#include -#include -#include -#include -#include #include -#include + +namespace arcticdb::storage { + enum class StorageOperation; +} namespace arcticdb::storage::azure { diff --git a/cpp/arcticdb/storage/azure/azure_real_client.cpp b/cpp/arcticdb/storage/azure/azure_real_client.cpp index 60a8101d787..0f400f07cab 100644 --- a/cpp/arcticdb/storage/azure/azure_real_client.cpp +++ b/cpp/arcticdb/storage/azure/azure_real_client.cpp @@ -7,10 +7,7 @@ #include -#include -#include -#include #include #include #include diff --git a/cpp/arcticdb/storage/azure/azure_real_client.hpp b/cpp/arcticdb/storage/azure/azure_real_client.hpp index 9fc8116de05..3c2c7ce8541 100644 --- a/cpp/arcticdb/storage/azure/azure_real_client.hpp +++ b/cpp/arcticdb/storage/azure/azure_real_client.hpp @@ -7,11 +7,7 @@ #pragma once -#include -#include -#include -#include #include namespace arcticdb::storage::azure { diff --git a/cpp/arcticdb/storage/azure/azure_storage.cpp b/cpp/arcticdb/storage/azure/azure_storage.cpp index 498cbe351d6..e7c3e533131 100644 --- a/cpp/arcticdb/storage/azure/azure_storage.cpp +++ b/cpp/arcticdb/storage/azure/azure_storage.cpp @@ -7,29 +7,18 @@ #include -#include -#include #include -#include -#include -#include -#include #include -#include #include #include #include -#include #include #include -#include -#include -#include #include #include diff --git a/cpp/arcticdb/storage/azure/azure_storage.hpp b/cpp/arcticdb/storage/azure/azure_storage.hpp index 7dc04f28ed1..2f08d0f1174 100644 --- a/cpp/arcticdb/storage/azure/azure_storage.hpp +++ b/cpp/arcticdb/storage/azure/azure_storage.hpp @@ -8,19 +8,10 @@ #pragma once #include -#include -#include #include -#include #include -#include -#include -#include -#include -#include -#include +#include #include -#include namespace arcticdb::storage::azure { diff --git a/cpp/arcticdb/storage/config_resolvers.cpp b/cpp/arcticdb/storage/config_resolvers.cpp index 0003bd48274..23dba03d061 100644 --- a/cpp/arcticdb/storage/config_resolvers.cpp +++ b/cpp/arcticdb/storage/config_resolvers.cpp @@ -6,16 +6,8 @@ */ #include -#include -#include -#include -#include -#include -#include - -#include + #include -#include namespace arcticdb::storage::details { diff --git a/cpp/arcticdb/storage/config_resolvers.hpp b/cpp/arcticdb/storage/config_resolvers.hpp index 50e5d9fb7a2..7e8f5bb4622 100644 --- a/cpp/arcticdb/storage/config_resolvers.hpp +++ b/cpp/arcticdb/storage/config_resolvers.hpp @@ -7,13 +7,10 @@ #pragma once -#include -#include -#include #include -#include +#include +#include -#include namespace arcticdb::storage { class ConfigResolver { diff --git a/cpp/arcticdb/storage/failure_simulation.hpp b/cpp/arcticdb/storage/failure_simulation.hpp index 012ae7d88af..d9f94e082a7 100644 --- a/cpp/arcticdb/storage/failure_simulation.hpp +++ b/cpp/arcticdb/storage/failure_simulation.hpp @@ -11,9 +11,8 @@ #include #include #include -#include #include - +#include namespace arcticdb { #ifdef _WIN32 diff --git a/cpp/arcticdb/storage/file/file_store.hpp b/cpp/arcticdb/storage/file/file_store.hpp index d34650577ae..f6499058d0e 100644 --- a/cpp/arcticdb/storage/file/file_store.hpp +++ b/cpp/arcticdb/storage/file/file_store.hpp @@ -4,7 +4,6 @@ * * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ - #include #include #include @@ -23,12 +22,15 @@ #include #include #include +#include +#include +#include +#include namespace arcticdb { - size_t max_data_size( - const std::vector>& items, + const std::vector>& items, const arcticdb::proto::encoding::VariantCodec& codec_opts, EncodingVersion encoding_version) { auto max_file_size = 0UL; @@ -62,7 +64,7 @@ void write_dataframe_to_file_internal( auto slices = slice(*frame, slicing); ARCTICDB_SUBSAMPLE_DEFAULT(SliceAndWrite) - auto slice_and_rowcount = get_slice_and_rowcount(slices); + auto slice_and_rowcount = arcticdb::pipelines::get_slice_and_rowcount(slices); const size_t write_window = ConfigsMap::instance()->get_int("VersionStore.BatchWriteWindow", static_cast(2 * async::TaskScheduler::instance()->io_thread_count())); auto key_seg_futs = folly::collect(folly::window(std::move(slice_and_rowcount), @@ -93,6 +95,7 @@ void write_dataframe_to_file_internal( return store->async_write(key_seg, dedup_map); }, batch_size)).via(&async::io_executor()) .thenValue([&frame, stream_id, store] (auto&& slice_and_keys) { + using namespace arcticdb::pipelines; return index::write_index(frame, std::forward(slice_and_keys), IndexPartialKey{stream_id, VersionId{0}}, store); }); // TODO include key size and key offset in max size calculation @@ -107,7 +110,7 @@ void write_dataframe_to_file_internal( version_store::ReadVersionOutput read_dataframe_from_file_internal( const StreamId& stream_id, const std::string& path, - ReadQuery& read_query, + pipelines::ReadQuery& read_query, const ReadOptions& read_options, const arcticdb::proto::encoding::VariantCodec &codec_opts) { auto config = storage::file::pack_config(path, codec_opts); diff --git a/cpp/arcticdb/storage/file/mapped_file_storage.cpp b/cpp/arcticdb/storage/file/mapped_file_storage.cpp index b15672605e9..7a482355eee 100644 --- a/cpp/arcticdb/storage/file/mapped_file_storage.cpp +++ b/cpp/arcticdb/storage/file/mapped_file_storage.cpp @@ -7,16 +7,12 @@ #include #include -#include -#include #include -#include #include #include #include #include #include - namespace arcticdb::storage::file { MappedFileStorage::MappedFileStorage(const LibraryPath &lib, OpenMode mode, Config conf) : diff --git a/cpp/arcticdb/storage/file/mapped_file_storage.hpp b/cpp/arcticdb/storage/file/mapped_file_storage.hpp index aedc4359e5d..70bfc1e2bb2 100644 --- a/cpp/arcticdb/storage/file/mapped_file_storage.hpp +++ b/cpp/arcticdb/storage/file/mapped_file_storage.hpp @@ -8,9 +8,8 @@ #pragma once #include -#include #include -#include +#include #include #include diff --git a/cpp/arcticdb/storage/library_manager.cpp b/cpp/arcticdb/storage/library_manager.cpp index 098f48c3003..7a0f1de8312 100644 --- a/cpp/arcticdb/storage/library_manager.cpp +++ b/cpp/arcticdb/storage/library_manager.cpp @@ -4,17 +4,13 @@ #include #include #include -#include #include #include #include -#include #include #include #include -#include -#include namespace arcticdb::storage { diff --git a/cpp/arcticdb/storage/library_manager.hpp b/cpp/arcticdb/storage/library_manager.hpp index ddb32edaa81..39595b1d617 100644 --- a/cpp/arcticdb/storage/library_manager.hpp +++ b/cpp/arcticdb/storage/library_manager.hpp @@ -8,23 +8,29 @@ #pragma once #include #include -#include #include #include -#include +namespace pybind11 { + class object; +} + +namespace arcticdb { + class Store; +} namespace arcticdb::storage { + class Library; class LibraryManager { public: explicit LibraryManager(const std::shared_ptr& library); ARCTICDB_NO_MOVE_OR_COPY(LibraryManager) - void write_library_config(const py::object& lib_cfg, const LibraryPath& path, const StorageOverride& storage_override, + void write_library_config(const pybind11::object& lib_cfg, const LibraryPath& path, const StorageOverride& storage_override, bool validate) const; - [[nodiscard]] py::object get_library_config(const LibraryPath& path, const StorageOverride& storage_override = StorageOverride{}) const; + [[nodiscard]] pybind11::object get_library_config(const LibraryPath& path, const StorageOverride& storage_override = StorageOverride{}) const; [[nodiscard]] bool is_library_config_ok(const LibraryPath& path, bool throw_on_failure) const; diff --git a/cpp/arcticdb/storage/library_path.hpp b/cpp/arcticdb/storage/library_path.hpp index fcef9d314e1..607af9a7b7b 100644 --- a/cpp/arcticdb/storage/library_path.hpp +++ b/cpp/arcticdb/storage/library_path.hpp @@ -29,8 +29,11 @@ class DefaultStringViewable : public std::shared_ptr { std::make_shared(args...)), hash_(arcticdb::hash(std::string_view{*this})) {} - DefaultStringViewable(const DefaultStringViewable &that) : - std::shared_ptr::shared_ptr(that), hash_(that.hash_) {} + DefaultStringViewable(const DefaultStringViewable&) = default; + DefaultStringViewable& operator=(const DefaultStringViewable&) = default; + + DefaultStringViewable(DefaultStringViewable&&) = default; + DefaultStringViewable& operator=(DefaultStringViewable&&) = default; operator std::string_view() const { return *this->get(); diff --git a/cpp/arcticdb/storage/lmdb/lmdb_mock_client.cpp b/cpp/arcticdb/storage/lmdb/lmdb_mock_client.cpp index 879089797ce..ebb4373fedc 100644 --- a/cpp/arcticdb/storage/lmdb/lmdb_mock_client.cpp +++ b/cpp/arcticdb/storage/lmdb/lmdb_mock_client.cpp @@ -8,9 +8,9 @@ #include #include -#include #include #include +#include namespace arcticdb::storage::lmdb { diff --git a/cpp/arcticdb/storage/lmdb/lmdb_mock_client.hpp b/cpp/arcticdb/storage/lmdb/lmdb_mock_client.hpp index 6e81bf67303..a20829169c5 100644 --- a/cpp/arcticdb/storage/lmdb/lmdb_mock_client.hpp +++ b/cpp/arcticdb/storage/lmdb/lmdb_mock_client.hpp @@ -10,11 +10,11 @@ #include #include -#include #include -#include -#include +namespace arcticdb::storage { + enum class StorageOperation; +} namespace arcticdb::storage::lmdb { diff --git a/cpp/arcticdb/storage/lmdb/lmdb_real_client.cpp b/cpp/arcticdb/storage/lmdb/lmdb_real_client.cpp index 4eb35fcd926..1f86f8ad3ec 100644 --- a/cpp/arcticdb/storage/lmdb/lmdb_real_client.cpp +++ b/cpp/arcticdb/storage/lmdb/lmdb_real_client.cpp @@ -6,7 +6,6 @@ */ #include -#include #include #include #include diff --git a/cpp/arcticdb/storage/lmdb/lmdb_real_client.hpp b/cpp/arcticdb/storage/lmdb/lmdb_real_client.hpp index 279ed5f0066..f643bcd6c2d 100644 --- a/cpp/arcticdb/storage/lmdb/lmdb_real_client.hpp +++ b/cpp/arcticdb/storage/lmdb/lmdb_real_client.hpp @@ -10,9 +10,7 @@ #include #include -#include #include -#include namespace arcticdb::storage::lmdb { diff --git a/cpp/arcticdb/storage/lmdb/lmdb_storage.cpp b/cpp/arcticdb/storage/lmdb/lmdb_storage.cpp index fa1f3c568de..186ee6b375a 100644 --- a/cpp/arcticdb/storage/lmdb/lmdb_storage.cpp +++ b/cpp/arcticdb/storage/lmdb/lmdb_storage.cpp @@ -12,19 +12,16 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include -#include +#include -#include #include namespace arcticdb::storage::lmdb { diff --git a/cpp/arcticdb/storage/lmdb/lmdb_storage.hpp b/cpp/arcticdb/storage/lmdb/lmdb_storage.hpp index 56297380847..cf0273b1bf3 100644 --- a/cpp/arcticdb/storage/lmdb/lmdb_storage.hpp +++ b/cpp/arcticdb/storage/lmdb/lmdb_storage.hpp @@ -8,19 +8,27 @@ #pragma once #include -#include #include - -#include -#include -#include - +#include #include +// LMDB++ is using `std::is_pod` in `lmdb++.h`, which is deprecated as of C++20. +// See: https://github.com/drycpp/lmdbxx/blob/0b43ca87d8cfabba392dfe884eb1edb83874de02/lmdb%2B%2B.h#L1068 +// See: https://en.cppreference.com/w/cpp/types/is_pod +// This suppresses the warning. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#ifdef ARCTICDB_USING_CONDA +#include +#else +#include +#endif + namespace fs = std::filesystem; namespace arcticdb::storage::lmdb { +class LmdbClientWrapper; class LmdbStorage final : public Storage { public: diff --git a/cpp/arcticdb/storage/memory/memory_storage.cpp b/cpp/arcticdb/storage/memory/memory_storage.cpp index bf111719301..228c99571a9 100644 --- a/cpp/arcticdb/storage/memory/memory_storage.cpp +++ b/cpp/arcticdb/storage/memory/memory_storage.cpp @@ -9,7 +9,6 @@ #include -#include #include #include #include diff --git a/cpp/arcticdb/storage/memory/memory_storage.hpp b/cpp/arcticdb/storage/memory/memory_storage.hpp index a4b288bd626..07f70ed8637 100644 --- a/cpp/arcticdb/storage/memory/memory_storage.hpp +++ b/cpp/arcticdb/storage/memory/memory_storage.hpp @@ -8,12 +8,9 @@ #pragma once #include -#include #include -#include -#include +#include #include -#include namespace arcticdb::storage::memory { diff --git a/cpp/arcticdb/storage/mongo/mongo_client.cpp b/cpp/arcticdb/storage/mongo/mongo_client.cpp index 608dd04b8a2..74f6eaace69 100644 --- a/cpp/arcticdb/storage/mongo/mongo_client.cpp +++ b/cpp/arcticdb/storage/mongo/mongo_client.cpp @@ -17,12 +17,12 @@ #include #include #include -#include #include #include #include -#include #include +#include +#include namespace arcticdb::storage::mongo { diff --git a/cpp/arcticdb/storage/mongo/mongo_client.hpp b/cpp/arcticdb/storage/mongo/mongo_client.hpp index 1eb0078bce9..4f682e639a6 100644 --- a/cpp/arcticdb/storage/mongo/mongo_client.hpp +++ b/cpp/arcticdb/storage/mongo/mongo_client.hpp @@ -6,9 +6,7 @@ */ #pragma once -#include -#include #include #include diff --git a/cpp/arcticdb/storage/mongo/mongo_instance.hpp b/cpp/arcticdb/storage/mongo/mongo_instance.hpp index d8b7e4863be..cf32bf70d3c 100644 --- a/cpp/arcticdb/storage/mongo/mongo_instance.hpp +++ b/cpp/arcticdb/storage/mongo/mongo_instance.hpp @@ -10,7 +10,6 @@ #include #include #include -#include namespace arcticdb::storage::mongo { diff --git a/cpp/arcticdb/storage/mongo/mongo_mock_client.cpp b/cpp/arcticdb/storage/mongo/mongo_mock_client.cpp index 605991d21b5..07e0286ba99 100644 --- a/cpp/arcticdb/storage/mongo/mongo_mock_client.cpp +++ b/cpp/arcticdb/storage/mongo/mongo_mock_client.cpp @@ -5,15 +5,13 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include #include #include -#include #include #include #include #include - +#include namespace arcticdb::storage::mongo { diff --git a/cpp/arcticdb/storage/mongo/mongo_mock_client.hpp b/cpp/arcticdb/storage/mongo/mongo_mock_client.hpp index ec4ea72228b..0839f163f32 100644 --- a/cpp/arcticdb/storage/mongo/mongo_mock_client.hpp +++ b/cpp/arcticdb/storage/mongo/mongo_mock_client.hpp @@ -7,11 +7,13 @@ #pragma once -#include #include -#include #include +namespace arcticdb::storage { + enum class StorageOperation; +} + namespace arcticdb::storage::mongo { struct MongoDocumentKey { diff --git a/cpp/arcticdb/storage/mongo/mongo_storage.cpp b/cpp/arcticdb/storage/mongo/mongo_storage.cpp index 1ca7f808ee4..d5ecee27f2d 100644 --- a/cpp/arcticdb/storage/mongo/mongo_storage.cpp +++ b/cpp/arcticdb/storage/mongo/mongo_storage.cpp @@ -8,20 +8,16 @@ #include -#include #include -#include #include #include -#include #include #include #include #include #include #include -#include namespace arcticdb::storage::mongo { diff --git a/cpp/arcticdb/storage/mongo/mongo_storage.hpp b/cpp/arcticdb/storage/mongo/mongo_storage.hpp index ced21689d86..89bb45af290 100644 --- a/cpp/arcticdb/storage/mongo/mongo_storage.hpp +++ b/cpp/arcticdb/storage/mongo/mongo_storage.hpp @@ -8,16 +8,14 @@ #pragma once #include -#include -#include #include -#include -#include +#include namespace arcticdb::storage::mongo { class MongoInstance; class MongoClient; +class MongoClientWrapper; class MongoStorage final : public Storage { public: diff --git a/cpp/arcticdb/storage/python_bindings.cpp b/cpp/arcticdb/storage/python_bindings.cpp index c573852554c..fd66cf092ae 100644 --- a/cpp/arcticdb/storage/python_bindings.cpp +++ b/cpp/arcticdb/storage/python_bindings.cpp @@ -8,10 +8,8 @@ #include #include #include -#include #include -#include #include #include @@ -19,6 +17,7 @@ #include #include #include +#include namespace py = pybind11; diff --git a/cpp/arcticdb/storage/python_bindings.hpp b/cpp/arcticdb/storage/python_bindings.hpp index 5bab4f25d59..5e51e402bb1 100644 --- a/cpp/arcticdb/storage/python_bindings.hpp +++ b/cpp/arcticdb/storage/python_bindings.hpp @@ -8,11 +8,7 @@ #pragma once #include -#include -#include -#include -#include namespace arcticdb::storage::apy { diff --git a/cpp/arcticdb/storage/rocksdb/rocksdb_storage.hpp b/cpp/arcticdb/storage/rocksdb/rocksdb_storage.hpp index b0c76460eff..cc22055a2b9 100644 --- a/cpp/arcticdb/storage/rocksdb/rocksdb_storage.hpp +++ b/cpp/arcticdb/storage/rocksdb/rocksdb_storage.hpp @@ -8,11 +8,8 @@ #pragma once #include -#include #include -#include -#include -#include +#include #include diff --git a/cpp/arcticdb/storage/s3/nfs_backed_storage.cpp b/cpp/arcticdb/storage/s3/nfs_backed_storage.cpp index b28a2fb8a83..a602b5404ee 100644 --- a/cpp/arcticdb/storage/s3/nfs_backed_storage.cpp +++ b/cpp/arcticdb/storage/s3/nfs_backed_storage.cpp @@ -9,8 +9,10 @@ #include #include +#include #include #include +#include namespace arcticdb::storage::nfs_backed { diff --git a/cpp/arcticdb/storage/s3/nfs_backed_storage.hpp b/cpp/arcticdb/storage/s3/nfs_backed_storage.hpp index 10c1cdeb8b4..f2224d41c1c 100644 --- a/cpp/arcticdb/storage/s3/nfs_backed_storage.hpp +++ b/cpp/arcticdb/storage/s3/nfs_backed_storage.hpp @@ -8,19 +8,13 @@ #pragma once #include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include #include -#include + +namespace arcticdb::storage::s3 { + class S3ApiInstance; +} namespace arcticdb::storage::nfs_backed { diff --git a/cpp/arcticdb/storage/s3/s3_api.cpp b/cpp/arcticdb/storage/s3/s3_api.cpp index 675c7c9b594..b551317cef3 100644 --- a/cpp/arcticdb/storage/s3/s3_api.cpp +++ b/cpp/arcticdb/storage/s3/s3_api.cpp @@ -6,7 +6,6 @@ */ #include -#include #include #include #include diff --git a/cpp/arcticdb/storage/s3/s3_mock_client.cpp b/cpp/arcticdb/storage/s3/s3_mock_client.cpp index e0bff24f18d..c4936c4e668 100644 --- a/cpp/arcticdb/storage/s3/s3_mock_client.cpp +++ b/cpp/arcticdb/storage/s3/s3_mock_client.cpp @@ -8,10 +8,7 @@ #include #include -#include -#include -#include #include diff --git a/cpp/arcticdb/storage/s3/s3_mock_client.hpp b/cpp/arcticdb/storage/s3/s3_mock_client.hpp index 04c68122182..aeee7903966 100644 --- a/cpp/arcticdb/storage/s3/s3_mock_client.hpp +++ b/cpp/arcticdb/storage/s3/s3_mock_client.hpp @@ -7,22 +7,10 @@ #pragma once -#include #include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include + + namespace arcticdb::storage::s3 { diff --git a/cpp/arcticdb/storage/s3/s3_real_client.cpp b/cpp/arcticdb/storage/s3/s3_real_client.cpp index 37e18788e06..b96da089a9d 100644 --- a/cpp/arcticdb/storage/s3/s3_real_client.cpp +++ b/cpp/arcticdb/storage/s3/s3_real_client.cpp @@ -11,15 +11,11 @@ #include #include -#include #include -#include -#include #include #include -#include #include #include #include diff --git a/cpp/arcticdb/storage/s3/s3_real_client.hpp b/cpp/arcticdb/storage/s3/s3_real_client.hpp index 57bfe87b65c..6f023594ee5 100644 --- a/cpp/arcticdb/storage/s3/s3_real_client.hpp +++ b/cpp/arcticdb/storage/s3/s3_real_client.hpp @@ -11,17 +11,7 @@ #include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include + namespace arcticdb::storage::s3{ diff --git a/cpp/arcticdb/storage/s3/s3_storage.cpp b/cpp/arcticdb/storage/s3/s3_storage.cpp index c82fe35627c..86485fbf6f9 100644 --- a/cpp/arcticdb/storage/s3/s3_storage.cpp +++ b/cpp/arcticdb/storage/s3/s3_storage.cpp @@ -9,35 +9,14 @@ #include -#include -#include -#include -#include #include -#include -#include -#include -#include #include #include -#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include + #include #include diff --git a/cpp/arcticdb/storage/s3/s3_storage.hpp b/cpp/arcticdb/storage/s3/s3_storage.hpp index 1c8f8707106..bb70a9c0313 100644 --- a/cpp/arcticdb/storage/s3/s3_storage.hpp +++ b/cpp/arcticdb/storage/s3/s3_storage.hpp @@ -8,24 +8,19 @@ #pragma once #include -#include -#include -#include -#include #include -#include #include -#include #include -#include #include +#include +#include #include #include #include #include namespace arcticdb::storage::s3 { - +class S3ApiInstance; const std::string USE_AWS_CRED_PROVIDERS_TOKEN = "_RBAC_"; class S3Storage final : public Storage { diff --git a/cpp/arcticdb/storage/s3/s3_storage_tool.cpp b/cpp/arcticdb/storage/s3/s3_storage_tool.cpp index c87f7f95c75..7732cee1f29 100644 --- a/cpp/arcticdb/storage/s3/s3_storage_tool.cpp +++ b/cpp/arcticdb/storage/s3/s3_storage_tool.cpp @@ -6,12 +6,13 @@ */ #include - -#include +#include +#include #include #include #include #include +#include namespace arcticdb::storage::s3 { diff --git a/cpp/arcticdb/storage/s3/s3_storage_tool.hpp b/cpp/arcticdb/storage/s3/s3_storage_tool.hpp index ee21d384af0..65723857708 100644 --- a/cpp/arcticdb/storage/s3/s3_storage_tool.hpp +++ b/cpp/arcticdb/storage/s3/s3_storage_tool.hpp @@ -7,10 +7,11 @@ #pragma once -#include #include +#include namespace arcticdb::storage::s3 { +class S3ApiInstance; class S3StorageTool { public: diff --git a/cpp/arcticdb/storage/storage.hpp b/cpp/arcticdb/storage/storage.hpp index 9825d4415c1..40db18be25d 100644 --- a/cpp/arcticdb/storage/storage.hpp +++ b/cpp/arcticdb/storage/storage.hpp @@ -9,7 +9,6 @@ #include #include #include -#include namespace arcticdb::storage { diff --git a/cpp/arcticdb/storage/storage_factory.hpp b/cpp/arcticdb/storage/storage_factory.hpp index 36478a1775f..a9d1c8dad02 100644 --- a/cpp/arcticdb/storage/storage_factory.hpp +++ b/cpp/arcticdb/storage/storage_factory.hpp @@ -7,10 +7,8 @@ #pragma once -#include #include #include -#include namespace arcticdb { diff --git a/cpp/arcticdb/storage/test/in_memory_store.hpp b/cpp/arcticdb/storage/test/in_memory_store.hpp index 695c2fced67..1a34b8fdc7a 100644 --- a/cpp/arcticdb/storage/test/in_memory_store.hpp +++ b/cpp/arcticdb/storage/test/in_memory_store.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #include diff --git a/cpp/arcticdb/storage/test/test_azure_storage.cpp b/cpp/arcticdb/storage/test/test_azure_storage.cpp index 92e56ee2a60..3201edb1792 100644 --- a/cpp/arcticdb/storage/test/test_azure_storage.cpp +++ b/cpp/arcticdb/storage/test/test_azure_storage.cpp @@ -6,12 +6,10 @@ */ #include -#include -#include #include #include -#include +#include #include using namespace arcticdb; diff --git a/cpp/arcticdb/storage/test/test_embedded.cpp b/cpp/arcticdb/storage/test/test_embedded.cpp index 60ae84f09c3..8bf0a514d73 100644 --- a/cpp/arcticdb/storage/test/test_embedded.cpp +++ b/cpp/arcticdb/storage/test/test_embedded.cpp @@ -22,9 +22,6 @@ #include #include #include -#include -#include -#include namespace ac = arcticdb; namespace as = arcticdb::storage; diff --git a/cpp/arcticdb/storage/test/test_memory_storage.cpp b/cpp/arcticdb/storage/test/test_memory_storage.cpp index 730a596832e..02935a86a58 100644 --- a/cpp/arcticdb/storage/test/test_memory_storage.cpp +++ b/cpp/arcticdb/storage/test/test_memory_storage.cpp @@ -6,7 +6,6 @@ */ #include -#include #include #include diff --git a/cpp/arcticdb/storage/test/test_mongo_storage.cpp b/cpp/arcticdb/storage/test/test_mongo_storage.cpp index 87f560d180c..41ff2d78a16 100644 --- a/cpp/arcticdb/storage/test/test_mongo_storage.cpp +++ b/cpp/arcticdb/storage/test/test_mongo_storage.cpp @@ -7,12 +7,8 @@ #include -#include #include -#include -#include -#include const std::string test_server("mongodb://localhost:27017"); diff --git a/cpp/arcticdb/storage/test/test_s3_storage.cpp b/cpp/arcticdb/storage/test/test_s3_storage.cpp index 4365f4c7485..83b5a7815ac 100644 --- a/cpp/arcticdb/storage/test/test_s3_storage.cpp +++ b/cpp/arcticdb/storage/test/test_s3_storage.cpp @@ -11,12 +11,9 @@ #include #include #include -#include #include -#include #include -#include struct EnvFunctionShim : ::testing::Test { std::unordered_set env_vars_to_unset{}; diff --git a/cpp/arcticdb/storage/test/test_storage_exceptions.cpp b/cpp/arcticdb/storage/test/test_storage_exceptions.cpp index a7d422ec682..035f84cca0c 100644 --- a/cpp/arcticdb/storage/test/test_storage_exceptions.cpp +++ b/cpp/arcticdb/storage/test/test_storage_exceptions.cpp @@ -7,7 +7,6 @@ #include -#include #include #include #include diff --git a/cpp/arcticdb/stream/aggregator.hpp b/cpp/arcticdb/stream/aggregator.hpp index 90d2f9753a3..32a6c9d0572 100644 --- a/cpp/arcticdb/stream/aggregator.hpp +++ b/cpp/arcticdb/stream/aggregator.hpp @@ -12,7 +12,6 @@ #include #include -#include namespace arcticdb::stream { diff --git a/cpp/arcticdb/stream/append_map.cpp b/cpp/arcticdb/stream/append_map.cpp index 0ed792e6912..0a2d56fd98a 100644 --- a/cpp/arcticdb/stream/append_map.cpp +++ b/cpp/arcticdb/stream/append_map.cpp @@ -6,11 +6,9 @@ */ #include -#include #include #include #include -#include #include #include #include @@ -250,7 +248,7 @@ std::vector get_incomplete( auto entries = get_incomplete_append_slices_for_stream_id(store, stream_id, via_iteration, load_data); util::variant_match(range, - [](const RowRange &) { + [](const pipelines::RowRange &) { util::raise_rte("Only timestamp based ranges supported for filtering."); }, [&entries](const IndexRange &index_range) { @@ -367,7 +365,7 @@ AppendMapEntry entry_from_key(const std::shared_ptr& store, const if(seg) seg->attach_descriptor(desc); - auto frame_slice = FrameSlice{desc, ColRange{index_field_count, field_count}, RowRange{0, entry.total_rows_}}; + auto frame_slice = FrameSlice{desc, pipelines::ColRange{index_field_count, field_count}, pipelines::RowRange{0, entry.total_rows_}}; entry.slice_and_key_ = SliceAndKey{std::move(frame_slice), key, std::move(seg)}; return entry; } diff --git a/cpp/arcticdb/stream/append_map.hpp b/cpp/arcticdb/stream/append_map.hpp index 39eb4fe9e05..c4f39f21018 100644 --- a/cpp/arcticdb/stream/append_map.hpp +++ b/cpp/arcticdb/stream/append_map.hpp @@ -10,9 +10,6 @@ #include #include #include -#include -#include -#include namespace arcticdb::pipelines { struct PythonOutputFrame; @@ -21,7 +18,9 @@ using FilterRange = std::variant; } namespace arcticdb { - +namespace stream { + struct StreamSource; +} std::pair, size_t> read_head( const std::shared_ptr& store, StreamId stream_id); diff --git a/cpp/arcticdb/stream/piloted_clock.hpp b/cpp/arcticdb/stream/piloted_clock.hpp index f2b79189ac8..e14a311ad0b 100644 --- a/cpp/arcticdb/stream/piloted_clock.hpp +++ b/cpp/arcticdb/stream/piloted_clock.hpp @@ -1,5 +1,4 @@ #include -#include namespace arcticdb { diff --git a/cpp/arcticdb/stream/python_bindings.cpp b/cpp/arcticdb/stream/python_bindings.cpp index 02cd52cfd19..3b8c518b18b 100644 --- a/cpp/arcticdb/stream/python_bindings.cpp +++ b/cpp/arcticdb/stream/python_bindings.cpp @@ -7,17 +7,11 @@ #include -#include #include -#include #include #include -#include #include -#include -#include -#include namespace py = pybind11; diff --git a/cpp/arcticdb/stream/test/stream_test_common.cpp b/cpp/arcticdb/stream/test/stream_test_common.cpp index 3a02c8a639b..57e38155ea9 100644 --- a/cpp/arcticdb/stream/test/stream_test_common.cpp +++ b/cpp/arcticdb/stream/test/stream_test_common.cpp @@ -5,10 +5,10 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include - +#include +#include namespace arcticdb { -std::atomic PilotedClock::time_{0}; +std::atomic PilotedClock::time_{0}; } //namespace arcticdb \ No newline at end of file diff --git a/cpp/arcticdb/stream/test/stream_test_common.hpp b/cpp/arcticdb/stream/test/stream_test_common.hpp index 491a8d789ee..5bd5239b461 100644 --- a/cpp/arcticdb/stream/test/stream_test_common.hpp +++ b/cpp/arcticdb/stream/test/stream_test_common.hpp @@ -8,25 +8,13 @@ #pragma once #include -#include #include -#include -#include -#include - -#include -#include -#include -#include -#include + #include #include -#include #include #include #include -#include - #include namespace fg = folly::gen; @@ -347,19 +335,4 @@ inline auto test_store(const std::string &lib_name) { return version_store; } -struct TestStore : ::testing::Test { -protected: - virtual std::string get_name() = 0; - - void SetUp() override { - test_store_ = test_store(get_name()); - } - - void TearDown() override { - test_store_->clear(); - } - - std::shared_ptr test_store_; -}; - } //namespace arcticdb diff --git a/cpp/arcticdb/stream/test/test_aggregator.cpp b/cpp/arcticdb/stream/test/test_aggregator.cpp index ead376d72ff..8c63c653063 100644 --- a/cpp/arcticdb/stream/test/test_aggregator.cpp +++ b/cpp/arcticdb/stream/test/test_aggregator.cpp @@ -5,12 +5,10 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include #include #include -#include using namespace arcticdb; namespace as = arcticdb::stream; diff --git a/cpp/arcticdb/stream/test/test_append_map.cpp b/cpp/arcticdb/stream/test/test_append_map.cpp index fa7deef7d60..293a57b7a1d 100644 --- a/cpp/arcticdb/stream/test/test_append_map.cpp +++ b/cpp/arcticdb/stream/test/test_append_map.cpp @@ -13,6 +13,7 @@ #include #include #include +#include TEST(Append, Simple) { using namespace arcticdb; diff --git a/cpp/arcticdb/stream/test/test_row_builder.cpp b/cpp/arcticdb/stream/test/test_row_builder.cpp index b7c2a79298d..1a2626d3a36 100644 --- a/cpp/arcticdb/stream/test/test_row_builder.cpp +++ b/cpp/arcticdb/stream/test/test_row_builder.cpp @@ -7,7 +7,6 @@ #include -#include #include namespace as = arcticdb::stream; diff --git a/cpp/arcticdb/stream/test/test_segment_aggregator.cpp b/cpp/arcticdb/stream/test/test_segment_aggregator.cpp index eed31d9ac78..32816332b13 100644 --- a/cpp/arcticdb/stream/test/test_segment_aggregator.cpp +++ b/cpp/arcticdb/stream/test/test_segment_aggregator.cpp @@ -7,9 +7,9 @@ #include #include -#include #include #include +#include TEST(SegmentAggregator, Basic) { using namespace arcticdb; @@ -36,7 +36,7 @@ TEST(SegmentAggregator, Basic) { segments.emplace_back(std::move(wrapper.segment())); } - SegmentSinkWrapper seg_wrapper(symbol, TimeseriesIndex::default_index(), fields_from_range(std::vector{ + SegmentSinkWrapper seg_wrapper(symbol, stream::TimeseriesIndex::default_index(), fields_from_range(std::vector{ scalar_field(DataType::UINT64, "numbers"), scalar_field(DataType::ASCII_DYNAMIC64, "strings") })); diff --git a/cpp/arcticdb/stream/test/test_store_common.hpp b/cpp/arcticdb/stream/test/test_store_common.hpp new file mode 100644 index 00000000000..b54b0a00901 --- /dev/null +++ b/cpp/arcticdb/stream/test/test_store_common.hpp @@ -0,0 +1,26 @@ +/* Copyright 2024 Man Group Operations Limited + * + * Use of this software is governed by the Business Source License 1.1 included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software + * will be governed by the Apache License, version 2.0. + */ +#include +#include + +namespace arcticdb { + struct TestStore : ::testing::Test { + protected: + virtual std::string get_name() = 0; + + void SetUp() override { + test_store_ = test_store(get_name()); + } + + void TearDown() override { + test_store_->clear(); + } + + std::shared_ptr test_store_; + }; +} diff --git a/cpp/arcticdb/stream/test/test_types.cpp b/cpp/arcticdb/stream/test/test_types.cpp index fd3310d115f..79ba0a7b474 100644 --- a/cpp/arcticdb/stream/test/test_types.cpp +++ b/cpp/arcticdb/stream/test/test_types.cpp @@ -10,7 +10,6 @@ #include -#include #include #include diff --git a/cpp/arcticdb/toolbox/library_tool.cpp b/cpp/arcticdb/toolbox/library_tool.cpp index 0ff5573a7be..fe92744f4d6 100644 --- a/cpp/arcticdb/toolbox/library_tool.cpp +++ b/cpp/arcticdb/toolbox/library_tool.cpp @@ -9,14 +9,12 @@ #include #include -#include #include #include #include #include #include #include -#include #include #include diff --git a/cpp/arcticdb/toolbox/library_tool.hpp b/cpp/arcticdb/toolbox/library_tool.hpp index abc4867b4c2..dad916c638f 100644 --- a/cpp/arcticdb/toolbox/library_tool.hpp +++ b/cpp/arcticdb/toolbox/library_tool.hpp @@ -7,12 +7,9 @@ #pragma once -#include -#include #include #include -#include #include #include diff --git a/cpp/arcticdb/toolbox/python_bindings.cpp b/cpp/arcticdb/toolbox/python_bindings.cpp index c089d4cb72d..a7107869d45 100644 --- a/cpp/arcticdb/toolbox/python_bindings.cpp +++ b/cpp/arcticdb/toolbox/python_bindings.cpp @@ -5,10 +5,8 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include #include -#include #include #include #include diff --git a/cpp/arcticdb/util/allocator.cpp b/cpp/arcticdb/util/allocator.cpp index 735389afec2..a46b00fd52d 100644 --- a/cpp/arcticdb/util/allocator.cpp +++ b/cpp/arcticdb/util/allocator.cpp @@ -6,7 +6,7 @@ */ #include - +#include #include #include #include @@ -15,7 +15,6 @@ #include #include -#include namespace arcticdb { diff --git a/cpp/arcticdb/util/buffer.hpp b/cpp/arcticdb/util/buffer.hpp index 905856c22ce..22cf8a91811 100644 --- a/cpp/arcticdb/util/buffer.hpp +++ b/cpp/arcticdb/util/buffer.hpp @@ -7,8 +7,8 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/cpp/arcticdb/util/buffer_holder.hpp b/cpp/arcticdb/util/buffer_holder.hpp index 603500eeea6..4684bbcf4ed 100644 --- a/cpp/arcticdb/util/buffer_holder.hpp +++ b/cpp/arcticdb/util/buffer_holder.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include #include namespace arcticdb { diff --git a/cpp/arcticdb/util/buffer_pool.cpp b/cpp/arcticdb/util/buffer_pool.cpp index 30387174877..a22ca67944c 100644 --- a/cpp/arcticdb/util/buffer_pool.cpp +++ b/cpp/arcticdb/util/buffer_pool.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include namespace arcticdb { diff --git a/cpp/arcticdb/util/buffer_pool.hpp b/cpp/arcticdb/util/buffer_pool.hpp index 8f8efaab0bc..97d3984f58d 100644 --- a/cpp/arcticdb/util/buffer_pool.hpp +++ b/cpp/arcticdb/util/buffer_pool.hpp @@ -7,17 +7,19 @@ #pragma once -#include #ifdef ARCTICDB_USING_CONDA #include #else #include #endif - +#include +#include namespace arcticdb { +struct Buffer; + struct lock_policy { using mutex_type = std::mutex; using lock_type = std::lock_guard; diff --git a/cpp/arcticdb/util/decimal.cpp b/cpp/arcticdb/util/decimal.cpp index 337e59f8aec..fd3da5824ad 100644 --- a/cpp/arcticdb/util/decimal.cpp +++ b/cpp/arcticdb/util/decimal.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/cpp/arcticdb/util/error_code.hpp b/cpp/arcticdb/util/error_code.hpp index 921f649ce66..e67e4376088 100644 --- a/cpp/arcticdb/util/error_code.hpp +++ b/cpp/arcticdb/util/error_code.hpp @@ -6,11 +6,7 @@ */ #pragma once - #include - -#include - #include #include #include diff --git a/cpp/arcticdb/util/format_date.hpp b/cpp/arcticdb/util/format_date.hpp index d02f171118c..7617e60c333 100644 --- a/cpp/arcticdb/util/format_date.hpp +++ b/cpp/arcticdb/util/format_date.hpp @@ -11,13 +11,14 @@ #include #include #include +#include namespace arcticdb::util { using Clock = std::chrono::system_clock; using TimePoint = std::chrono::time_point; -inline std::string format_timestamp(entity::timestamp ts) { +inline std::string format_timestamp(arcticdb::entity::timestamp ts) { std::stringstream ss; #if defined(_WIN32) or defined(__APPLE__) auto time_point = Clock::time_point(std::chrono::duration_cast(std::chrono::nanoseconds(ts))); diff --git a/cpp/arcticdb/util/memory_mapped_file.hpp b/cpp/arcticdb/util/memory_mapped_file.hpp index b3904a61fce..c5a15edfea4 100644 --- a/cpp/arcticdb/util/memory_mapped_file.hpp +++ b/cpp/arcticdb/util/memory_mapped_file.hpp @@ -3,9 +3,8 @@ #include #ifdef WIN32 - +#include #include "Windows.h" -#include "winerror.h" namespace arcticdb { @@ -18,6 +17,7 @@ namespace arcticdb { public: MemoryMappedFile() = default; + ARCTICDB_NO_MOVE_OR_COPY(MemoryMappedFile) size_t get_file_size(const std::string& file_path) { LARGE_INTEGER size; @@ -122,7 +122,6 @@ namespace arcticdb { }; }//namespace arcticdb - #else #include #include diff --git a/cpp/arcticdb/util/memory_tracing.hpp b/cpp/arcticdb/util/memory_tracing.hpp index ac4431fbd5d..01e2f37169e 100644 --- a/cpp/arcticdb/util/memory_tracing.hpp +++ b/cpp/arcticdb/util/memory_tracing.hpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #ifdef WIN32 #include #else diff --git a/cpp/arcticdb/util/name_validation.cpp b/cpp/arcticdb/util/name_validation.cpp index d6765c50c35..2b1fe0c383f 100644 --- a/cpp/arcticdb/util/name_validation.cpp +++ b/cpp/arcticdb/util/name_validation.cpp @@ -7,10 +7,9 @@ #include -#include #include #include -#include +#include #include namespace arcticdb { @@ -23,7 +22,7 @@ constexpr auto MAX_SIZE = 255; void verify_name( const std::string& name_type_for_error, - const StringId& name, + const entity::StringId& name, bool check_symbol_out_of_range = true, const std::set& unsupported_chars = UNSUPPORTED_S3_CHARS, std::optional unsupported_prefix = std::nullopt, @@ -74,7 +73,7 @@ void verify_name( } } -void verify_symbol_key(const StreamId& symbol_key) { +void verify_symbol_key(const entity::StreamId& symbol_key) { if (ConfigsMap::instance()->get_int("VersionStore.NoStrictSymbolCheck")) { ARCTICDB_DEBUG(log::version(), "Key with stream id {} will not be strictly checked because VersionStore.NoStrictSymbolCheck variable is set to 1.", @@ -84,13 +83,13 @@ void verify_symbol_key(const StreamId& symbol_key) { util::variant_match( symbol_key, - [](const NumericId &num_symbol_key) { + [](const entity::NumericId &num_symbol_key) { (void) num_symbol_key; // Suppresses -Wunused-parameter ARCTICDB_DEBUG(log::version(), "Nothing to verify in stream id {} as it contains a NumericId.", num_symbol_key); return; }, - [](const StringId &str_symbol_key) { + [](const entity::StringId &str_symbol_key) { verify_name("symbol key", str_symbol_key); } ); @@ -99,7 +98,7 @@ void verify_symbol_key(const StreamId& symbol_key) { // Library names starting with "/" fail if storage is LMDB and library parts starting with "/" will fail in Mongo constexpr auto UNSUPPORTED_LMDB_MONGO_PREFIX = '/'; -void verify_library_path(const StringId& library_path, char delim) { +void verify_library_path(const entity::StringId& library_path, char delim) { verify_name("library name", library_path, false, {}, {}, delim); } @@ -119,7 +118,7 @@ void verify_library_path_part(const std::string& library_part, char delim) { } } -void verify_library_path_on_write(const Store* store, const StringId& library_path) { +void verify_library_path_on_write(const Store* store, const entity::StringId& library_path) { verify_name("library name", library_path, true, UNSUPPORTED_S3_CHARS); user_input::check( store->is_path_valid(library_path), diff --git a/cpp/arcticdb/util/name_validation.hpp b/cpp/arcticdb/util/name_validation.hpp index ad0587e4335..bc37fe0fcf7 100644 --- a/cpp/arcticdb/util/name_validation.hpp +++ b/cpp/arcticdb/util/name_validation.hpp @@ -7,27 +7,25 @@ #pragma once -#include #include -#include -#include -#include namespace arcticdb { +class Store; + // Verifies whether a symbol_key is valid and raises UserInputException exceptions on invalid symbol names. // Should be used only when writing new symbols to allow for backwards compatibility with old symbols. -void verify_symbol_key(const StreamId &symbol_key); +void verify_symbol_key(const entity::StreamId &symbol_key); // Does strict checks on library names and raises UserInputException if it encounters an error. // Should be checked only when writing new libraries to allow for backwards compatibility // with old invalid libraries. -void verify_library_path_on_write(const Store* store, const StringId& library_path); +void verify_library_path_on_write(const Store* store, const entity::StringId& library_path); // These two do relaxed checks which should always be run on each library operation (including // already existing libraries). These raise friendly error messages instead of segfaulting or // raising an obscure internal error. -void verify_library_path(const StringId& library_path, char delim); +void verify_library_path(const entity::StringId& library_path, char delim); void verify_library_path_part(const std::string& library_part, char delim); diff --git a/cpp/arcticdb/util/test/gtest_main.cpp b/cpp/arcticdb/util/test/gtest_main.cpp index cb6151b7752..2b5480781b8 100644 --- a/cpp/arcticdb/util/test/gtest_main.cpp +++ b/cpp/arcticdb/util/test/gtest_main.cpp @@ -7,7 +7,7 @@ #include #include -#include // Must not directly include Python.h on Windows +#include // Must not directly include Python.h on Windows int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/cpp/arcticdb/util/test/rapidcheck_generators.cpp b/cpp/arcticdb/util/test/rapidcheck_generators.cpp index 2b120cc9bd1..69a1b393196 100644 --- a/cpp/arcticdb/util/test/rapidcheck_generators.cpp +++ b/cpp/arcticdb/util/test/rapidcheck_generators.cpp @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/cpp/arcticdb/util/test/rapidcheck_generators.hpp b/cpp/arcticdb/util/test/rapidcheck_generators.hpp index f7ad4afdaa8..19fd2b428eb 100644 --- a/cpp/arcticdb/util/test/rapidcheck_generators.hpp +++ b/cpp/arcticdb/util/test/rapidcheck_generators.hpp @@ -8,11 +8,16 @@ #pragma once #include -#include - +#include +#include +#include +#include +#include +#include #include -#include +#include +namespace ac = arcticdb; inline rc::Gen gen_numeric_datatype() { return rc::gen::element( arcticdb::entity::DataType::INT8, @@ -153,17 +158,17 @@ folly::Future write_frame_data(const TestDataFrame inline folly::Future write_test_frame(ac::StreamId stream_id, const TestDataFrame &data_frame, - std::shared_ptr store) { + std::shared_ptr store) { auto schema = schema_from_test_frame(data_frame, std::move(stream_id)); auto start_end = test_frame_range(data_frame); auto gen_id = arcticdb::VersionId(0); - ac::StreamWriter writer{ + ac::stream::StreamWriter writer{ std::move(schema), std::move(store), gen_id, start_end, - ac::RowCountSegmentPolicy{4} + ac::stream::RowCountSegmentPolicy{4} }; return write_frame_data(data_frame, writer); @@ -217,9 +222,9 @@ bool check_read_frame(const TestDataFrame &data_frame, ReaderType &reader, std:: inline bool check_test_frame(const TestDataFrame &data_frame, const arcticdb::entity::AtomKey &key, - std::shared_ptr store, + std::shared_ptr store, std::vector &errors) { - ac::StreamReader()>, arcticdb::SegmentInMemory::Row> stream_reader{ + ac::stream::StreamReader()>, arcticdb::SegmentInMemory::Row> stream_reader{ [&]() { return std::vector{key}; }, std::move(store) }; diff --git a/cpp/arcticdb/util/test/rapidcheck_string_pool.cpp b/cpp/arcticdb/util/test/rapidcheck_string_pool.cpp index dd1418e3f6c..c0b4387da48 100644 --- a/cpp/arcticdb/util/test/rapidcheck_string_pool.cpp +++ b/cpp/arcticdb/util/test/rapidcheck_string_pool.cpp @@ -6,9 +6,9 @@ */ #include -#include #include #include +#include #include #include diff --git a/cpp/arcticdb/util/test/test_bitmagic.cpp b/cpp/arcticdb/util/test/test_bitmagic.cpp index 725b2d4c16c..19163d947e4 100644 --- a/cpp/arcticdb/util/test/test_bitmagic.cpp +++ b/cpp/arcticdb/util/test/test_bitmagic.cpp @@ -7,12 +7,11 @@ #include -#include -#include #include #include +#include +#include -#include TEST(BitMagic, Basic) { using namespace arcticdb; diff --git a/cpp/arcticdb/util/test/test_buffer_pool.cpp b/cpp/arcticdb/util/test/test_buffer_pool.cpp index ccae59f0d77..eb7522039b3 100644 --- a/cpp/arcticdb/util/test/test_buffer_pool.cpp +++ b/cpp/arcticdb/util/test/test_buffer_pool.cpp @@ -7,6 +7,7 @@ #include #include +#include namespace arcticdb { TEST(BufferPool, Basic) { diff --git a/cpp/arcticdb/util/test/test_cursor.cpp b/cpp/arcticdb/util/test/test_cursor.cpp index a99f9947a66..151830e9210 100644 --- a/cpp/arcticdb/util/test/test_cursor.cpp +++ b/cpp/arcticdb/util/test/test_cursor.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/cpp/arcticdb/util/test/test_format_date.cpp b/cpp/arcticdb/util/test/test_format_date.cpp index c74bdef6ee8..daf0688f205 100644 --- a/cpp/arcticdb/util/test/test_format_date.cpp +++ b/cpp/arcticdb/util/test/test_format_date.cpp @@ -6,7 +6,6 @@ */ #include -#include #include TEST(FormatDate, ZeroTs) { diff --git a/cpp/arcticdb/util/test/test_hash.cpp b/cpp/arcticdb/util/test/test_hash.cpp index db3b24aa1bb..6e7dbc84c96 100644 --- a/cpp/arcticdb/util/test/test_hash.cpp +++ b/cpp/arcticdb/util/test/test_hash.cpp @@ -7,7 +7,6 @@ #include #include -#include using namespace arcticdb; diff --git a/cpp/arcticdb/util/test/test_ranges_from_future.cpp b/cpp/arcticdb/util/test/test_ranges_from_future.cpp index eba54d80c1f..2da11f60f98 100644 --- a/cpp/arcticdb/util/test/test_ranges_from_future.cpp +++ b/cpp/arcticdb/util/test/test_ranges_from_future.cpp @@ -7,7 +7,6 @@ #include #include - #include #include diff --git a/cpp/arcticdb/util/test/test_tracing_allocator.cpp b/cpp/arcticdb/util/test/test_tracing_allocator.cpp index dd45f4cd130..6fae853de89 100644 --- a/cpp/arcticdb/util/test/test_tracing_allocator.cpp +++ b/cpp/arcticdb/util/test/test_tracing_allocator.cpp @@ -7,7 +7,6 @@ #include #include -#include #include TEST(Allocator, Tracing) { diff --git a/cpp/arcticdb/util/type_handler.hpp b/cpp/arcticdb/util/type_handler.hpp index 87fcb6296fb..d12f3cb3fa2 100644 --- a/cpp/arcticdb/util/type_handler.hpp +++ b/cpp/arcticdb/util/type_handler.hpp @@ -9,7 +9,6 @@ #include #include -#include #include @@ -19,6 +18,7 @@ namespace arcticdb { struct BufferHolder; +struct ColumnMapping; struct ITypeHandler { template diff --git a/cpp/arcticdb/version/local_versioned_engine.cpp b/cpp/arcticdb/version/local_versioned_engine.cpp index 0fd631a72ae..0b563492207 100644 --- a/cpp/arcticdb/version/local_versioned_engine.cpp +++ b/cpp/arcticdb/version/local_versioned_engine.cpp @@ -15,12 +15,15 @@ #include #include #include -#include #include #include #include #include #include +#include +#include +#include + namespace arcticdb::version_store { diff --git a/cpp/arcticdb/version/local_versioned_engine.hpp b/cpp/arcticdb/version/local_versioned_engine.hpp index 0c9a1e6bc32..d080a4a54b3 100644 --- a/cpp/arcticdb/version/local_versioned_engine.hpp +++ b/cpp/arcticdb/version/local_versioned_engine.hpp @@ -8,21 +8,15 @@ #pragma once #include -#include -#include #include #include #include #include #include -#include -#include -#include #include #include #include -#include namespace arcticdb::version_store { /** diff --git a/cpp/arcticdb/version/python_bindings.cpp b/cpp/arcticdb/version/python_bindings.cpp index a75911105ae..409bbcf59ee 100644 --- a/cpp/arcticdb/version/python_bindings.cpp +++ b/cpp/arcticdb/version/python_bindings.cpp @@ -7,22 +7,20 @@ #include #include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include #include #include #include +#include #include namespace arcticdb::version_store { diff --git a/cpp/arcticdb/version/python_bindings.hpp b/cpp/arcticdb/version/python_bindings.hpp index c3c9e86f187..b255fbbed45 100644 --- a/cpp/arcticdb/version/python_bindings.hpp +++ b/cpp/arcticdb/version/python_bindings.hpp @@ -8,10 +8,13 @@ #pragma once #include -#include namespace py = pybind11; +namespace arcticdb { + struct ArcticException; +} + namespace arcticdb::version_store { void register_bindings(py::module &m, py::exception& base_exception); diff --git a/cpp/arcticdb/version/schema_checks.hpp b/cpp/arcticdb/version/schema_checks.hpp index 9b81d54058f..4960dcf0ef0 100644 --- a/cpp/arcticdb/version/schema_checks.hpp +++ b/cpp/arcticdb/version/schema_checks.hpp @@ -51,7 +51,7 @@ inline void check_normalization_index_match( const IndexDescriptor::Type old_idx_kind = old_descriptor.index().type(); const IndexDescriptor::Type new_idx_kind = frame.desc.index().type(); if (operation == UPDATE) { - const bool new_is_timeseries = std::holds_alternative(frame.index); + const bool new_is_timeseries = std::holds_alternative(frame.index); util::check_rte( (old_idx_kind == IndexDescriptor::TIMESTAMP || old_idx_kind == IndexDescriptor::EMPTY) && new_is_timeseries, "Update will not work as expected with a non-timeseries index" diff --git a/cpp/arcticdb/version/snapshot.cpp b/cpp/arcticdb/version/snapshot.cpp index 027d7b61145..9964351ccb3 100644 --- a/cpp/arcticdb/version/snapshot.cpp +++ b/cpp/arcticdb/version/snapshot.cpp @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include diff --git a/cpp/arcticdb/version/snapshot.hpp b/cpp/arcticdb/version/snapshot.hpp index 0c9c0f050bc..5b3d3511e32 100644 --- a/cpp/arcticdb/version/snapshot.hpp +++ b/cpp/arcticdb/version/snapshot.hpp @@ -10,14 +10,7 @@ #include #include #include -#include #include -#include -#include -#include -#include -#include -#include namespace arcticdb { diff --git a/cpp/arcticdb/version/test/rapidcheck_version_map.cpp b/cpp/arcticdb/version/test/rapidcheck_version_map.cpp index 2bc9886bf52..6409fe612b1 100644 --- a/cpp/arcticdb/version/test/rapidcheck_version_map.cpp +++ b/cpp/arcticdb/version/test/rapidcheck_version_map.cpp @@ -5,18 +5,12 @@ * As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0. */ -#include -#include +#include #include -#include #include -#include -#include - -#include -#include #include + #include #include diff --git a/cpp/arcticdb/version/test/test_merge.cpp b/cpp/arcticdb/version/test/test_merge.cpp index e2be9abe938..fff9c662e09 100644 --- a/cpp/arcticdb/version/test/test_merge.cpp +++ b/cpp/arcticdb/version/test/test_merge.cpp @@ -12,6 +12,8 @@ #include #include #include +#include + struct MergeReadsTestStore : arcticdb::TestStore { protected: diff --git a/cpp/arcticdb/version/test/test_sparse.cpp b/cpp/arcticdb/version/test/test_sparse.cpp index 87892677135..0f8c7c83e69 100644 --- a/cpp/arcticdb/version/test/test_sparse.cpp +++ b/cpp/arcticdb/version/test/test_sparse.cpp @@ -14,6 +14,8 @@ #include #include #include +#include + struct SparseTestStore : arcticdb::TestStore { protected: diff --git a/cpp/arcticdb/version/test/test_symbol_list.cpp b/cpp/arcticdb/version/test/test_symbol_list.cpp index 5c6a0b515e0..e5d24e4257d 100644 --- a/cpp/arcticdb/version/test/test_symbol_list.cpp +++ b/cpp/arcticdb/version/test/test_symbol_list.cpp @@ -6,7 +6,6 @@ */ #include -#include // Included in gtest 1.10 #include #include @@ -14,8 +13,7 @@ #include #include #include - -#include +#include #include #include diff --git a/cpp/arcticdb/version/test/test_version_map.cpp b/cpp/arcticdb/version/test/test_version_map.cpp index 38d9a5c95bb..d44c9709c5f 100644 --- a/cpp/arcticdb/version/test/test_version_map.cpp +++ b/cpp/arcticdb/version/test/test_version_map.cpp @@ -6,16 +6,14 @@ */ #include -#include - +#include #include #include #include #include -#include -#include -#include #include +#include + namespace arcticdb { diff --git a/cpp/arcticdb/version/test/test_version_map_batch.cpp b/cpp/arcticdb/version/test/test_version_map_batch.cpp index 761aa1c01cb..80ed0799c45 100644 --- a/cpp/arcticdb/version/test/test_version_map_batch.cpp +++ b/cpp/arcticdb/version/test/test_version_map_batch.cpp @@ -3,6 +3,9 @@ #include #include #include +#include +#include + using namespace arcticdb; using namespace arcticdb::pipelines; diff --git a/cpp/arcticdb/version/test/test_version_store.cpp b/cpp/arcticdb/version/test/test_version_store.cpp index 6910ce21544..aba051eb1bc 100644 --- a/cpp/arcticdb/version/test/test_version_store.cpp +++ b/cpp/arcticdb/version/test/test_version_store.cpp @@ -8,16 +8,16 @@ #include #include -#include #include -#include #include #include #include -#include #include +#include +#include +#include + -#include #include #include @@ -48,7 +48,7 @@ auto write_version_frame( auto wrapper = get_test_simple_frame(stream_id, rows, start_val); auto& frame = wrapper.frame_; auto store = pvs._test_get_store(); - auto var_key = write_frame(std::move(pk), frame, slicing, store, de_dup_map).get(); + auto var_key = arcticdb::pipelines::write_frame(std::move(pk), frame, slicing, store, de_dup_map).get(); auto key = to_atom(var_key); // Moves if (update_version_map) { pvs._test_get_version_map()->write_version(store, key, previous_key); diff --git a/cpp/arcticdb/version/version_core-inl.hpp b/cpp/arcticdb/version/version_core-inl.hpp index 501a88263ec..011884c9a39 100644 --- a/cpp/arcticdb/version/version_core-inl.hpp +++ b/cpp/arcticdb/version/version_core-inl.hpp @@ -13,6 +13,15 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include + namespace arcticdb { @@ -33,7 +42,7 @@ void merge_frames_for_keys_impl( struct StreamMergeWrapper { StreamMergeWrapper( KeySupplier &&key_supplier, - std::shared_ptr store, + std::shared_ptr store, const IndexRange &index_range, StreamId id) : stream_reader_(std::move(key_supplier), std::move(store), storage::ReadKeyOpts{}, index_range), @@ -77,8 +86,8 @@ void merge_frames_for_keys_impl( input_streams.emplace(std::make_unique(std::move(key_func), store, index_range, index_key.id())); } - using AggregatorType = Aggregator; - AggregatorType agg{DynamicSchema{index.create_stream_descriptor(target_id, {}), index}, std::move(func), std::move(segmentation_policy)}; + using AggregatorType = stream::Aggregator; + AggregatorType agg{stream::DynamicSchema{index.create_stream_descriptor(target_id, {}), index}, std::move(func), std::move(segmentation_policy)}; do_merge(input_streams, agg, true); } diff --git a/cpp/arcticdb/version/version_core.cpp b/cpp/arcticdb/version/version_core.cpp index f27a53b8306..4056082ca69 100644 --- a/cpp/arcticdb/version/version_core.cpp +++ b/cpp/arcticdb/version/version_core.cpp @@ -22,18 +22,17 @@ #include #include #include -#include #include #include #include -#include #include #include -#include #include #include #include #include +#include +#include namespace arcticdb::version_store { @@ -105,7 +104,7 @@ folly::Future async_write_dataframe_impl( if (validate_index && !index_is_not_timeseries_or_is_sorted_ascending(*frame)) { sorting::raise("When calling write with validate_index enabled, input data must be sorted"); } - return write_frame(std::move(partial_key), frame, slicing_arg, store, de_dup_map, sparsify_floats); + return arcticdb::pipelines::write_frame(std::move(partial_key), frame, slicing_arg, store, de_dup_map, sparsify_floats); } namespace { @@ -381,7 +380,7 @@ VersionedItem update_impl( orig_filter_range = idx_range; return intersecting_segments(affected_keys, idx_range, idx_range, update_info.next_version_id_, store); }, - [](const RowRange&)-> std::pair, std::vector> { + [](const pipelines::RowRange&)-> std::pair, std::vector> { util::raise_rte("Unexpected row_range in update query"); } ); @@ -498,10 +497,10 @@ Composite process_clauses( std::make_shared(std::move(segment_and_slice.segment_in_memory_)), entity_ids[idx], segment_proc_unit_counts[entity_ids[idx]]); component_manager->add( - std::make_shared(std::move(segment_and_slice.ranges_and_key_.row_range_)), + std::make_shared(std::move(segment_and_slice.ranges_and_key_.row_range_)), entity_ids[idx]); component_manager->add( - std::make_shared(std::move(segment_and_slice.ranges_and_key_.col_range_)), + std::make_shared(std::move(segment_and_slice.ranges_and_key_.col_range_)), entity_ids[idx]); component_manager->add( std::make_shared(std::move(segment_and_slice.ranges_and_key_.key_)), @@ -876,7 +875,7 @@ void check_incompletes_index_ranges_dont_overlap(const std::shared_ptris_pickled() && std::holds_alternative(read_query.row_filter)), "Cannot use head/tail/row_range with pickled data, use plain read instead"); + util::check_rte(!(pipeline_context->is_pickled() && std::holds_alternative(read_query.row_filter)), "Cannot use head/tail/row_range with pickled data, use plain read instead"); mark_index_slices(pipeline_context, opt_false(read_options.dynamic_schema_), pipeline_context->bucketize_dynamic_); frame = read_direct(store, pipeline_context, buffers, read_options); } diff --git a/cpp/arcticdb/version/version_core.hpp b/cpp/arcticdb/version/version_core.hpp index 9247c611361..8ccd23b2b1f 100644 --- a/cpp/arcticdb/version/version_core.hpp +++ b/cpp/arcticdb/version/version_core.hpp @@ -10,24 +10,21 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include -#include -#include #include -#include -#include + +namespace arcticdb{ + struct WriteOptions; + struct ReadOptions; + class DeDupMap; +} namespace arcticdb::version_store { using namespace arcticdb::entity; using namespace arcticdb::pipelines; +struct UpdateInfo; VersionedItem write_dataframe_impl( const std::shared_ptr& store, diff --git a/cpp/arcticdb/version/version_map_batch_methods.cpp b/cpp/arcticdb/version/version_map_batch_methods.cpp index 6e18165c40b..2f61726c616 100644 --- a/cpp/arcticdb/version/version_map_batch_methods.cpp +++ b/cpp/arcticdb/version/version_map_batch_methods.cpp @@ -6,6 +6,7 @@ */ #include +#include namespace arcticdb { diff --git a/cpp/arcticdb/version/version_map_batch_methods.hpp b/cpp/arcticdb/version/version_map_batch_methods.hpp index e6b77b78b20..7f4474ffda0 100644 --- a/cpp/arcticdb/version/version_map_batch_methods.hpp +++ b/cpp/arcticdb/version/version_map_batch_methods.hpp @@ -7,16 +7,13 @@ #pragma once -#include #include #include #include -#include -#include #include - #include + namespace arcticdb { struct SymbolStatus { diff --git a/cpp/arcticdb/version/version_store_api.cpp b/cpp/arcticdb/version/version_store_api.cpp index ff4d4d0ad4c..ef2a2aba32e 100644 --- a/cpp/arcticdb/version/version_store_api.cpp +++ b/cpp/arcticdb/version/version_store_api.cpp @@ -8,10 +8,7 @@ #include #include -#include #include -#include -#include #include #include #include @@ -19,19 +16,18 @@ #include #include #include -#include #include #include #include -#include #include #include +#include #include #include #include #include +#include -#include namespace arcticdb::version_store { @@ -52,7 +48,7 @@ VersionedItem PythonVersionStore::write_dataframe_specific_version( ARCTICDB_SAMPLE(WriteDataFrame, 0) ARCTICDB_DEBUG(log::version(), "write_dataframe_specific_version stream_id: {} , version_id: {}", stream_id, version_id); - if (auto version_key = ::arcticdb::get_specific_version(store(), version_map(), stream_id, version_id, VersionQuery{}); version_key) { + if (auto version_key = arcticdb::get_specific_version(store(), version_map(), stream_id, version_id, VersionQuery{}); version_key) { log::version().warn("Symbol stream_id: {} already exists with version_id: {}", stream_id, version_id); return {std::move(*version_key)}; } diff --git a/cpp/arcticdb/version/version_store_api.hpp b/cpp/arcticdb/version/version_store_api.hpp index 326d5d61240..4a690260e42 100644 --- a/cpp/arcticdb/version/version_store_api.hpp +++ b/cpp/arcticdb/version/version_store_api.hpp @@ -10,31 +10,11 @@ #include #include #include -#include -#include -#include -#include -#include #include -#include -#include -#include #include -#include #include -#include -#include -#include -#include -#include -#include -#include #include #include -#include - -#include -#include namespace arcticdb::version_store { diff --git a/cpp/arcticdb/version/version_utils.hpp b/cpp/arcticdb/version/version_utils.hpp index e21229280af..21fc031a43e 100644 --- a/cpp/arcticdb/version/version_utils.hpp +++ b/cpp/arcticdb/version/version_utils.hpp @@ -9,7 +9,6 @@ #include #include -#include #include #include #include