diff --git a/CMakeLists.txt b/CMakeLists.txt index 566a3cabb4..2de21da6c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -302,7 +302,6 @@ set(scylla_sources transport/event_notifier.cc transport/messages/result_message.cc transport/server.cc - types.cc unimplemented.cc validation.cc vint-serialization.cc @@ -317,11 +316,12 @@ add_subdirectory(alternator) add_subdirectory(auth) add_subdirectory(cql3) add_subdirectory(idl) +add_subdirectory(rust) add_subdirectory(schema) add_subdirectory(sstables) add_subdirectory(test) +add_subdirectory(types) add_subdirectory(utils) -add_subdirectory(rust) add_executable(scylla ${scylla_sources} @@ -336,6 +336,7 @@ target_link_libraries(scylla PRIVATE schema sstables test-perf + types utils wasmtime_bindings) target_link_libraries(Boost::regex diff --git a/alternator/serialization.hh b/alternator/serialization.hh index dc81f1ebf7..8fc6787150 100644 --- a/alternator/serialization.hh +++ b/alternator/serialization.hh @@ -11,7 +11,7 @@ #include #include #include -#include "types.hh" +#include "types/types.hh" #include "schema/schema_fwd.hh" #include "keys.hh" #include "utils/rjson.hh" diff --git a/alternator/ttl.cc b/alternator/ttl.cc index 6bf06dcfca..a0f380c527 100644 --- a/alternator/ttl.cc +++ b/alternator/ttl.cc @@ -34,7 +34,7 @@ #include "gms/feature_service.hh" #include "sstables/types.hh" #include "mutation/mutation.hh" -#include "types.hh" +#include "types/types.hh" #include "types/map.hh" #include "utils/rjson.hh" #include "utils/big_decimal.hh" diff --git a/cdc/log.cc b/cdc/log.cc index 33f0799fbb..e0bdcad3b7 100644 --- a/cdc/log.cc +++ b/cdc/log.cc @@ -37,7 +37,7 @@ #include "utils/UUID_gen.hh" #include "utils/managed_bytes.hh" #include "utils/fragment_range.hh" -#include "types.hh" +#include "types/types.hh" #include "concrete_types.hh" #include "types/listlike_partial_deserializing_iterator.hh" #include "tracing/trace_state.hh" diff --git a/compound.hh b/compound.hh index 56e1752453..d6e0df693e 100644 --- a/compound.hh +++ b/compound.hh @@ -8,7 +8,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include #include #include diff --git a/concrete_types.hh b/concrete_types.hh index 90cd0e8da7..5dc98a322d 100644 --- a/concrete_types.hh +++ b/concrete_types.hh @@ -10,7 +10,7 @@ #include -#include "types.hh" +#include "types/types.hh" #include "types/list.hh" #include "types/map.hh" #include "types/set.hh" diff --git a/configure.py b/configure.py index 459f75f5fd..4d4926fc55 100755 --- a/configure.py +++ b/configure.py @@ -830,7 +830,7 @@ scylla_core = (['message/messaging_service.cc', 'utils/murmur_hash.cc', 'utils/uuid.cc', 'utils/big_decimal.cc', - 'types.cc', + 'types/types.cc', 'validation.cc', 'service/priority_manager.cc', 'service/migration_manager.cc', diff --git a/counters.hh b/counters.hh index bd71cb5896..8d37d41d4f 100644 --- a/counters.hh +++ b/counters.hh @@ -13,7 +13,7 @@ #include #include "mutation/atomic_cell.hh" -#include "types.hh" +#include "types/types.hh" #include "locator/host_id.hh" class mutation; diff --git a/cql3/CMakeLists.txt b/cql3/CMakeLists.txt index a8387db5d7..c0001b6424 100644 --- a/cql3/CMakeLists.txt +++ b/cql3/CMakeLists.txt @@ -106,7 +106,6 @@ target_sources(cql3 restrictions/statement_restrictions.cc result_set.cc prepare_context.cc - ${CMAKE_SOURCE_DIR}/types.cc ${cql_grammar_srcs}) target_include_directories(cql3 PUBLIC diff --git a/cql3/column_specification.hh b/cql3/column_specification.hh index 0ffee34ae0..bda754d30b 100644 --- a/cql3/column_specification.hh +++ b/cql3/column_specification.hh @@ -10,7 +10,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" namespace cql3 { diff --git a/cql3/cql3_type.hh b/cql3/cql3_type.hh index b81b9c6e89..d3b795f476 100644 --- a/cql3/cql3_type.hh +++ b/cql3/cql3_type.hh @@ -10,7 +10,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include "data_dictionary/data_dictionary.hh" #include "exceptions/exceptions.hh" #include diff --git a/cql3/error_collector.hh b/cql3/error_collector.hh index 64eedba9a6..f6f909350b 100644 --- a/cql3/error_collector.hh +++ b/cql3/error_collector.hh @@ -12,7 +12,7 @@ #include "cql3/error_listener.hh" #include "exceptions/exceptions.hh" -#include "types.hh" +#include "types/types.hh" namespace cql3 { diff --git a/cql3/functions/abstract_function.hh b/cql3/functions/abstract_function.hh index b42e222720..f629f8405e 100644 --- a/cql3/functions/abstract_function.hh +++ b/cql3/functions/abstract_function.hh @@ -11,7 +11,7 @@ #pragma once #include "function.hh" -#include "types.hh" +#include "types/types.hh" #include "cql3/cql3_type.hh" #include #include diff --git a/cql3/functions/aggregate_fcts.cc b/cql3/functions/aggregate_fcts.cc index 592bff8da0..488c1e1bbb 100644 --- a/cql3/functions/aggregate_fcts.cc +++ b/cql3/functions/aggregate_fcts.cc @@ -9,7 +9,7 @@ */ #include "bytes.hh" -#include "types.hh" +#include "types/types.hh" #include "types/tuple.hh" #include "cql3/functions/scalar_function.hh" #include "cql3/util.hh" diff --git a/cql3/functions/as_json_function.hh b/cql3/functions/as_json_function.hh index b908e55803..cf7f751d3f 100644 --- a/cql3/functions/as_json_function.hh +++ b/cql3/functions/as_json_function.hh @@ -17,7 +17,7 @@ #include "cql3/type_json.hh" #include "bytes_ostream.hh" -#include "types.hh" +#include "types/types.hh" #include diff --git a/cql3/functions/native_aggregate_function.hh b/cql3/functions/native_aggregate_function.hh index 9816e1e552..495a6db5d6 100644 --- a/cql3/functions/native_aggregate_function.hh +++ b/cql3/functions/native_aggregate_function.hh @@ -10,7 +10,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include "native_function.hh" #include "aggregate_function.hh" #include diff --git a/cql3/functions/token_fct.hh b/cql3/functions/token_fct.hh index 6f38b1fd0e..b49e888f6b 100644 --- a/cql3/functions/token_fct.hh +++ b/cql3/functions/token_fct.hh @@ -10,7 +10,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include "native_scalar_function.hh" #include "dht/i_partitioner.hh" #include "utils/UUID.hh" diff --git a/cql3/functions/uuid_fcts.hh b/cql3/functions/uuid_fcts.hh index f513112ba1..522f03627d 100644 --- a/cql3/functions/uuid_fcts.hh +++ b/cql3/functions/uuid_fcts.hh @@ -10,7 +10,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include "native_scalar_function.hh" #include "utils/UUID.hh" diff --git a/cql3/selection/field_selector.hh b/cql3/selection/field_selector.hh index 003753e1f6..0da0e12736 100644 --- a/cql3/selection/field_selector.hh +++ b/cql3/selection/field_selector.hh @@ -11,7 +11,7 @@ #pragma once #include "selector.hh" -#include "types.hh" +#include "types/types.hh" #include "types/user.hh" namespace cql3 { diff --git a/cql3/selection/selector.hh b/cql3/selection/selector.hh index 57bf4e0682..98838d42bb 100644 --- a/cql3/selection/selector.hh +++ b/cql3/selection/selector.hh @@ -13,7 +13,7 @@ #include #include "cql3/assignment_testable.hh" #include "query-request.hh" -#include "types.hh" +#include "types/types.hh" #include "schema/schema_fwd.hh" #include "counters.hh" diff --git a/cql3/statements/describe_statement.cc b/cql3/statements/describe_statement.cc index 4d2b631bbc..4cba3c3ff3 100644 --- a/cql3/statements/describe_statement.cc +++ b/cql3/statements/describe_statement.cc @@ -21,7 +21,7 @@ #include "seastar/core/on_internal_error.hh" #include "seastar/coroutine/maybe_yield.hh" #include "service/client_state.hh" -#include "types.hh" +#include "types/types.hh" #include "cql3/query_processor.hh" #include "cql3/cql_statement.hh" #include "cql3/statements/raw/describe_statement.hh" diff --git a/cql3/type_json.hh b/cql3/type_json.hh index 084513e41f..15a56edace 100644 --- a/cql3/type_json.hh +++ b/cql3/type_json.hh @@ -8,7 +8,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include "utils/rjson.hh" bytes from_json_object(const abstract_type &t, const rjson::value& value); diff --git a/cql3/untyped_result_set.hh b/cql3/untyped_result_set.hh index 66ef8db526..961f54ebf6 100644 --- a/cql3/untyped_result_set.hh +++ b/cql3/untyped_result_set.hh @@ -11,7 +11,7 @@ #include #include #include "bytes.hh" -#include "types.hh" +#include "types/types.hh" #include "types/map.hh" #include "types/list.hh" #include "types/set.hh" diff --git a/cql3/values.hh b/cql3/values.hh index 1ff680c1f9..dc896c945e 100644 --- a/cql3/values.hh +++ b/cql3/values.hh @@ -8,7 +8,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include "types/collection.hh" #include "bytes.hh" diff --git a/db/cql_type_parser.cc b/db/cql_type_parser.cc index 4677375904..97ae88283f 100644 --- a/db/cql_type_parser.cc +++ b/db/cql_type_parser.cc @@ -14,7 +14,7 @@ #include "cql3/CqlParser.hpp" #include "cql3/util.hh" #include "cql_type_parser.hh" -#include "types.hh" +#include "types/types.hh" #include "data_dictionary/user_types_metadata.hh" static ::shared_ptr parse_raw(const sstring& str) { diff --git a/db/cql_type_parser.hh b/db/cql_type_parser.hh index f71eb60fcd..d26cf5c83c 100644 --- a/db/cql_type_parser.hh +++ b/db/cql_type_parser.hh @@ -13,7 +13,7 @@ #include #include -#include "types.hh" +#include "types/types.hh" #include "seastarx.hh" diff --git a/db/functions/function.hh b/db/functions/function.hh index 74422eab51..0d0021915b 100644 --- a/db/functions/function.hh +++ b/db/functions/function.hh @@ -10,7 +10,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include #include diff --git a/db/marshal/type_parser.hh b/db/marshal/type_parser.hh index 45618752ac..77ec220b72 100644 --- a/db/marshal/type_parser.hh +++ b/db/marshal/type_parser.hh @@ -10,7 +10,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include diff --git a/db/schema_tables.cc b/db/schema_tables.cc index b7be4a5883..b750221693 100644 --- a/db/schema_tables.cc +++ b/db/schema_tables.cc @@ -75,7 +75,7 @@ #include "cql3/expr/expression.hh" #include "cql3/column_identifier.hh" #include "cql3/column_specification.hh" -#include "types.hh" +#include "types/types.hh" using namespace db; using namespace std::chrono_literals; diff --git a/db/system_distributed_keyspace.cc b/db/system_distributed_keyspace.cc index faa218b365..17f0c3e306 100644 --- a/db/system_distributed_keyspace.cc +++ b/db/system_distributed_keyspace.cc @@ -14,7 +14,7 @@ #include "db/system_keyspace.hh" #include "schema/schema_builder.hh" #include "timeout_config.hh" -#include "types.hh" +#include "types/types.hh" #include "types/tuple.hh" #include "types/set.hh" #include "cdc/generation.hh" diff --git a/db/system_keyspace.cc b/db/system_keyspace.cc index 323d077177..f80d2ebc20 100644 --- a/db/system_keyspace.cc +++ b/db/system_keyspace.cc @@ -18,7 +18,7 @@ #include #include #include "system_keyspace.hh" -#include "types.hh" +#include "types/types.hh" #include "service/storage_proxy.hh" #include "service/client_state.hh" #include "service/query_state.hh" diff --git a/dht/i_partitioner.cc b/dht/i_partitioner.cc index 83eb64a4ad..a09c99eeec 100644 --- a/dht/i_partitioner.cc +++ b/dht/i_partitioner.cc @@ -13,7 +13,7 @@ #include "dht/token-sharding.hh" #include "dht/partition_filter.hh" #include "utils/class_registrator.hh" -#include "types.hh" +#include "types/types.hh" #include "utils/murmur_hash.hh" #include "utils/div_ceil.hh" #include diff --git a/dht/i_partitioner.hh b/dht/i_partitioner.hh index de6b505291..52bbecef7a 100644 --- a/dht/i_partitioner.hh +++ b/dht/i_partitioner.hh @@ -12,7 +12,7 @@ #include #include #include -#include "types.hh" +#include "types/types.hh" #include "keys.hh" #include "utils/managed_bytes.hh" #include diff --git a/dht/token.hh b/dht/token.hh index 277c3197c2..6018e644a3 100644 --- a/dht/token.hh +++ b/dht/token.hh @@ -10,7 +10,7 @@ #include "bytes.hh" #include "utils/managed_bytes.hh" -#include "types.hh" +#include "types/types.hh" #include #include diff --git a/keys.hh b/keys.hh index 32e837d635..2d85e61257 100644 --- a/keys.hh +++ b/keys.hh @@ -9,7 +9,7 @@ #pragma once #include "bytes.hh" -#include "types.hh" +#include "types/types.hh" #include "compound_compat.hh" #include "utils/managed_bytes.hh" #include "utils/hashing.hh" diff --git a/lang/lua.hh b/lang/lua.hh index 81aa1c53a2..f3e736f956 100644 --- a/lang/lua.hh +++ b/lang/lua.hh @@ -8,7 +8,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include "utils/updateable_value.hh" #include diff --git a/lang/lua_scylla_types.hh b/lang/lua_scylla_types.hh index f807b0dfdf..9ea582e875 100644 --- a/lang/lua_scylla_types.hh +++ b/lang/lua_scylla_types.hh @@ -7,7 +7,7 @@ */ #include -#include "types.hh" +#include "types/types.hh" namespace lua { diff --git a/lang/wasm.hh b/lang/wasm.hh index 5a776bf262..0ae3bfc2ee 100644 --- a/lang/wasm.hh +++ b/lang/wasm.hh @@ -8,7 +8,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include #include "db/functions/function_name.hh" #include "rust/wasmtime_bindings.hh" diff --git a/mutation/atomic_cell.cc b/mutation/atomic_cell.cc index dbfdb4c1d8..561a0dd26d 100644 --- a/mutation/atomic_cell.cc +++ b/mutation/atomic_cell.cc @@ -9,7 +9,7 @@ #include "atomic_cell.hh" #include "atomic_cell_or_collection.hh" #include "counters.hh" -#include "types.hh" +#include "types/types.hh" atomic_cell atomic_cell::make_dead(api::timestamp_type timestamp, gc_clock::time_point deletion_time) { return atomic_cell_type::make_dead(timestamp, deletion_time); diff --git a/mutation/atomic_cell_hash.hh b/mutation/atomic_cell_hash.hh index 0582bb7fcd..27169fdbd3 100644 --- a/mutation/atomic_cell_hash.hh +++ b/mutation/atomic_cell_hash.hh @@ -10,7 +10,7 @@ // Not part of atomic_cell.hh to avoid cyclic dependency between types.hh and atomic_cell.hh -#include "types.hh" +#include "types/types.hh" #include "types/collection.hh" #include "atomic_cell.hh" #include "atomic_cell_or_collection.hh" diff --git a/mutation/position_in_partition.hh b/mutation/position_in_partition.hh index 2a67e5fab3..f53ed93081 100644 --- a/mutation/position_in_partition.hh +++ b/mutation/position_in_partition.hh @@ -8,7 +8,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include "keys.hh" #include "clustering_bounds_comparator.hh" #include "query-request.hh" diff --git a/query-result-set.hh b/query-result-set.hh index ab5002cfe4..f61cd6e428 100644 --- a/query-result-set.hh +++ b/query-result-set.hh @@ -10,7 +10,7 @@ #include -#include "types.hh" +#include "types/types.hh" #include "schema/schema.hh" #include diff --git a/query-result-writer.hh b/query-result-writer.hh index 5947071819..6b9406c333 100644 --- a/query-result-writer.hh +++ b/query-result-writer.hh @@ -8,7 +8,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include "mutation/atomic_cell.hh" #include "query-request.hh" #include "query-result.hh" diff --git a/redis/commands.cc b/redis/commands.cc index 294a6e04ad..34eba7ec8d 100644 --- a/redis/commands.cc +++ b/redis/commands.cc @@ -10,7 +10,7 @@ #include #include "redis/request.hh" #include "redis/reply.hh" -#include "types.hh" +#include "types/types.hh" #include "service_permit.hh" #include "service/client_state.hh" #include "redis/options.hh" diff --git a/redis/keyspace_utils.cc b/redis/keyspace_utils.cc index 6ceca41972..6e399f8d32 100644 --- a/redis/keyspace_utils.cc +++ b/redis/keyspace_utils.cc @@ -10,7 +10,7 @@ #include #include "redis/keyspace_utils.hh" #include "schema/schema_builder.hh" -#include "types.hh" +#include "types/types.hh" #include "exceptions/exceptions.hh" #include "cql3/statements/ks_prop_defs.hh" #include diff --git a/redis/lolwut.hh b/redis/lolwut.hh index d374082f84..052f86f140 100644 --- a/redis/lolwut.hh +++ b/redis/lolwut.hh @@ -7,7 +7,7 @@ */ #pragma once -#include "types.hh" +#include "types/types.hh" namespace redis { diff --git a/redis/mutation_utils.cc b/redis/mutation_utils.cc index c6289747eb..e1c627178b 100644 --- a/redis/mutation_utils.cc +++ b/redis/mutation_utils.cc @@ -7,7 +7,7 @@ */ #include "redis/mutation_utils.hh" -#include "types.hh" +#include "types/types.hh" #include "service/storage_proxy.hh" #include "schema/schema.hh" #include diff --git a/redis/mutation_utils.hh b/redis/mutation_utils.hh index 7f4a34e7d1..8fcc6888d4 100644 --- a/redis/mutation_utils.hh +++ b/redis/mutation_utils.hh @@ -7,7 +7,7 @@ */ #pragma once -#include "types.hh" +#include "types/types.hh" class service_permit; diff --git a/redis/options.cc b/redis/options.cc index 6470f6486e..7927bbcc42 100644 --- a/redis/options.cc +++ b/redis/options.cc @@ -7,7 +7,7 @@ */ #include "redis/options.hh" -#include "types.hh" +#include "types/types.hh" #include "service/storage_proxy.hh" #include "data_dictionary/data_dictionary.hh" #include "schema/schema.hh" diff --git a/redis/version.hh b/redis/version.hh index 9ce4e3b049..045655016b 100644 --- a/redis/version.hh +++ b/redis/version.hh @@ -7,7 +7,7 @@ */ #pragma once -#include "types.hh" +#include "types/types.hh" namespace redis { diff --git a/replica/database.hh b/replica/database.hh index bd273d5527..a0c45dfd46 100644 --- a/replica/database.hh +++ b/replica/database.hh @@ -27,7 +27,7 @@ #include #include #include -#include "types.hh" +#include "types/types.hh" #include #include #include "db/commitlog/replay_position.hh" diff --git a/schema/schema.hh b/schema/schema.hh index dbcfaf4a12..91adcf00e7 100644 --- a/schema/schema.hh +++ b/schema/schema.hh @@ -20,7 +20,7 @@ #include #include #include "seastar/core/sstring.hh" -#include "types.hh" +#include "types/types.hh" #include "compound.hh" #include "gc_clock.hh" #include "compress.hh" diff --git a/sstables/compress.hh b/sstables/compress.hh index e6d16078d6..d4b9ef1ea1 100644 --- a/sstables/compress.hh +++ b/sstables/compress.hh @@ -42,7 +42,7 @@ #include #include -#include "types.hh" +#include "types/types.hh" #include "sstables/types.hh" #include "checksum_utils.hh" #include "../compress.hh" diff --git a/sstables/metadata_collector.hh b/sstables/metadata_collector.hh index 69b144a7b9..7d3a1fc9a3 100644 --- a/sstables/metadata_collector.hh +++ b/sstables/metadata_collector.hh @@ -10,7 +10,7 @@ #pragma once -#include "types.hh" +#include "sstables/types.hh" #include "utils/extremum_tracking.hh" #include "utils/murmur_hash.hh" #include "hyperloglog.hh" diff --git a/sstables/promoted_index_blocks_reader.hh b/sstables/promoted_index_blocks_reader.hh index 9e768f0b09..93e19bc2f8 100644 --- a/sstables/promoted_index_blocks_reader.hh +++ b/sstables/promoted_index_blocks_reader.hh @@ -9,7 +9,6 @@ #pragma once #include "consumer.hh" -#include "types.hh" #include "column_translation.hh" #include "m_format_read_helpers.hh" #include "sstables/mx/parsers.hh" diff --git a/sstables/sstable_mutation_reader.hh b/sstables/sstable_mutation_reader.hh index 1a8c8edf31..3ab80c44df 100644 --- a/sstables/sstable_mutation_reader.hh +++ b/sstables/sstable_mutation_reader.hh @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ #include "mutation/mutation.hh" -#include "types.hh" #include #include #include "key.hh" diff --git a/sstables/sstable_version.hh b/sstables/sstable_version.hh index a336d8c123..d4441cc5e6 100644 --- a/sstables/sstable_version.hh +++ b/sstables/sstable_version.hh @@ -9,7 +9,7 @@ #pragma once -#include "types.hh" +#include "sstables/types.hh" #include "version.hh" #include "component_type.hh" diff --git a/sstables/sstable_version_k_l.hh b/sstables/sstable_version_k_l.hh index b9dcb2503c..ab1fd84609 100644 --- a/sstables/sstable_version_k_l.hh +++ b/sstables/sstable_version_k_l.hh @@ -10,7 +10,6 @@ #pragma once #include "sstable_version.hh" -#include "types.hh" namespace sstables { diff --git a/sstables/sstable_version_m.hh b/sstables/sstable_version_m.hh index f4460fd0a7..1caa74a4d1 100644 --- a/sstables/sstable_version_m.hh +++ b/sstables/sstable_version_m.hh @@ -10,7 +10,6 @@ #pragma once #include "sstable_version.hh" -#include "types.hh" namespace sstables { diff --git a/sstables/sstables.cc b/sstables/sstables.cc index 5d51a21558..cb61eadb13 100644 --- a/sstables/sstables.cc +++ b/sstables/sstables.cc @@ -33,7 +33,6 @@ #include #include "dht/sharder.hh" -#include "types.hh" #include "writer.hh" #include "m_format_read_helpers.hh" #include "open_info.hh" diff --git a/sstables/sstables.hh b/sstables/sstables.hh index d938a8781f..9fbc7fab93 100644 --- a/sstables/sstables.hh +++ b/sstables/sstables.hh @@ -20,7 +20,6 @@ #include #include #include -#include "types.hh" #include "schema/schema_fwd.hh" #include #include "encoding_stats.hh" diff --git a/sstables/writer.hh b/sstables/writer.hh index a35b56f4d2..0e2aab2317 100644 --- a/sstables/writer.hh +++ b/sstables/writer.hh @@ -10,7 +10,7 @@ #include #include -#include "types.hh" +#include "sstables/types.hh" #include "checksum_utils.hh" #include "progress_monitor.hh" #include "vint-serialization.hh" diff --git a/streaming/stream_summary.cc b/streaming/stream_summary.cc index e12926855c..166ea61beb 100644 --- a/streaming/stream_summary.cc +++ b/streaming/stream_summary.cc @@ -9,7 +9,7 @@ */ #include "streaming/stream_summary.hh" -#include "types.hh" +#include "types/types.hh" #include "utils/serialization.hh" namespace streaming { diff --git a/test/boost/UUID_test.cc b/test/boost/UUID_test.cc index 54b13381d9..2f5730d23c 100644 --- a/test/boost/UUID_test.cc +++ b/test/boost/UUID_test.cc @@ -11,7 +11,7 @@ #include #include #include "utils/UUID_gen.hh" -#include "types.hh" +#include "types/types.hh" BOOST_AUTO_TEST_CASE(test_generation_of_name_based_UUID) { auto uuid = utils::UUID_gen::get_name_UUID("systembatchlog"); diff --git a/test/boost/cdc_test.cc b/test/boost/cdc_test.cc index 136b2ca0df..4d51b1c380 100644 --- a/test/boost/cdc_test.cc +++ b/test/boost/cdc_test.cc @@ -21,7 +21,7 @@ #include "test/lib/log.hh" #include "transport/messages/result_message.hh" -#include "types.hh" +#include "types/types.hh" #include "types/tuple.hh" #include "types/map.hh" #include "types/list.hh" diff --git a/test/boost/expr_test.cc b/test/boost/expr_test.cc index a5d12425cb..017f1539f3 100644 --- a/test/boost/expr_test.cc +++ b/test/boost/expr_test.cc @@ -1,7 +1,7 @@ #include "cql3/column_identifier.hh" #include "cql3/util.hh" #include "seastar/core/shared_ptr.hh" -#include "types.hh" +#include "types/types.hh" #include "types/list.hh" #include "types/map.hh" #include diff --git a/test/boost/keys_test.cc b/test/boost/keys_test.cc index 4f0908d664..b474ada07c 100644 --- a/test/boost/keys_test.cc +++ b/test/boost/keys_test.cc @@ -13,7 +13,7 @@ #include "keys.hh" #include "schema/schema.hh" #include "schema/schema_builder.hh" -#include "types.hh" +#include "types/types.hh" #include "idl/keys.dist.hh" #include "serializer_impl.hh" diff --git a/test/boost/large_paging_state_test.cc b/test/boost/large_paging_state_test.cc index 5383f1340b..04359177f9 100644 --- a/test/boost/large_paging_state_test.cc +++ b/test/boost/large_paging_state_test.cc @@ -12,7 +12,7 @@ #include "test/lib/cql_test_env.hh" #include "transport/messages/result_message.hh" -#include "types.hh" +#include "types/types.hh" static lw_shared_ptr extract_paging_state(::shared_ptr res) { auto rows = dynamic_pointer_cast(res); diff --git a/test/boost/partitioner_test.cc b/test/boost/partitioner_test.cc index b452217bee..1c258da4bf 100644 --- a/test/boost/partitioner_test.cc +++ b/test/boost/partitioner_test.cc @@ -14,7 +14,7 @@ #include "dht/sharder.hh" #include "dht/murmur3_partitioner.hh" #include "schema/schema.hh" -#include "types.hh" +#include "types/types.hh" #include "schema/schema_builder.hh" #include "utils/div_ceil.hh" diff --git a/test/boost/serialization_test.cc b/test/boost/serialization_test.cc index a89fbf9396..7437018cec 100644 --- a/test/boost/serialization_test.cc +++ b/test/boost/serialization_test.cc @@ -13,7 +13,7 @@ #include #include "utils/serialization.hh" -#include "types.hh" +#include "types/types.hh" #include "gms/inet_address.hh" #include "gms/inet_address_serializer.hh" #include "serializer_impl.hh" diff --git a/test/boost/sstable_3_x_test.cc b/test/boost/sstable_3_x_test.cc index a8d5740241..fe92c3d814 100644 --- a/test/boost/sstable_3_x_test.cc +++ b/test/boost/sstable_3_x_test.cc @@ -32,7 +32,7 @@ #include "test/lib/random_utils.hh" #include "sstables/types.hh" #include "keys.hh" -#include "types.hh" +#include "types/types.hh" #include "types/user.hh" #include "partition_slice_builder.hh" #include "schema/schema.hh" diff --git a/test/boost/types_test.cc b/test/boost/types_test.cc index d41dfccc58..76f3b6753e 100644 --- a/test/boost/types_test.cc +++ b/test/boost/types_test.cc @@ -13,7 +13,7 @@ #include #include #include -#include "types.hh" +#include "types/types.hh" #include "types/tuple.hh" #include "compound.hh" #include "db/marshal/type_parser.hh" diff --git a/test/manual/partition_data_test.cc b/test/manual/partition_data_test.cc index 74e60d46ee..243cd69170 100644 --- a/test/manual/partition_data_test.cc +++ b/test/manual/partition_data_test.cc @@ -17,7 +17,7 @@ #include "test/lib/random_utils.hh" #include "utils/disk-error-handler.hh" #include "mutation/atomic_cell.hh" -#include "types.hh" +#include "types/types.hh" BOOST_AUTO_TEST_CASE(test_atomic_cell) { struct test_case { diff --git a/test/perf/perf_row_cache_reads.cc b/test/perf/perf_row_cache_reads.cc index b06d7fc5d3..9c3d05a99a 100644 --- a/test/perf/perf_row_cache_reads.cc +++ b/test/perf/perf_row_cache_reads.cc @@ -25,7 +25,7 @@ #include "test/lib/random_utils.hh" #include "test/lib/simple_schema.hh" #include "querier.hh" -#include "types.hh" +#include "types/types.hh" #include "reader_concurrency_semaphore.hh" /// Tests read scenarios from cache. diff --git a/tracing/trace_keyspace_helper.cc b/tracing/trace_keyspace_helper.cc index ecad64af39..9b9c41c521 100644 --- a/tracing/trace_keyspace_helper.cc +++ b/tracing/trace_keyspace_helper.cc @@ -8,7 +8,7 @@ * SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0) */ #include -#include "types.hh" +#include "types/types.hh" #include "tracing/trace_keyspace_helper.hh" #include "cql3/statements/batch_statement.hh" #include "cql3/statements/modification_statement.hh" diff --git a/tracing/trace_state.hh b/tracing/trace_state.hh index 1121c8adf9..a239eefb6c 100644 --- a/tracing/trace_state.hh +++ b/tracing/trace_state.hh @@ -18,7 +18,7 @@ #include "gms/inet_address.hh" #include "auth/authenticated_user.hh" #include "db/consistency_level_type.hh" -#include "types.hh" +#include "types/types.hh" #include "timestamp.hh" #include "inet_address_vectors.hh" diff --git a/types/CMakeLists.txt b/types/CMakeLists.txt new file mode 100644 index 0000000000..0ea97534a5 --- /dev/null +++ b/types/CMakeLists.txt @@ -0,0 +1,12 @@ +add_library(types STATIC) +target_sources(types + PRIVATE + types.cc) +target_include_directories(types + PUBLIC + ${CMAKE_SOURCE_DIR}) +target_link_libraries(types + cql3 + idl + Seastar::seastar + xxHash::xxhash) diff --git a/types/collection.hh b/types/collection.hh index 8369d40912..cd28dfa965 100644 --- a/types/collection.hh +++ b/types/collection.hh @@ -11,7 +11,7 @@ #include #include #include -#include "types.hh" +#include "types/types.hh" #include "collection_mutation.hh" #include "utils/chunked_vector.hh" #include "schema/schema_fwd.hh" diff --git a/types/list.hh b/types/list.hh index 504c9bc60f..c1f547d813 100644 --- a/types/list.hh +++ b/types/list.hh @@ -12,7 +12,7 @@ #include #include -#include "types.hh" +#include "types/types.hh" #include "types/collection.hh" class user_type_impl; diff --git a/types/listlike_partial_deserializing_iterator.hh b/types/listlike_partial_deserializing_iterator.hh index 82c17adfb6..c35692461c 100644 --- a/types/listlike_partial_deserializing_iterator.hh +++ b/types/listlike_partial_deserializing_iterator.hh @@ -13,7 +13,7 @@ #include "utils/fragment_range.hh" #include "utils/managed_bytes.hh" #include "exceptions/exceptions.hh" -#include "types.hh" +#include "types/types.hh" int read_collection_size(bytes_view& in); bytes_view read_collection_key(bytes_view& in); diff --git a/types/map.hh b/types/map.hh index 9551d9dd85..f0a90ec2a4 100644 --- a/types/map.hh +++ b/types/map.hh @@ -13,7 +13,7 @@ #include #include -#include "types.hh" +#include "types/types.hh" #include "types/collection.hh" class user_type_impl; diff --git a/types/set.hh b/types/set.hh index f8bd6c351f..18807bfdf1 100644 --- a/types/set.hh +++ b/types/set.hh @@ -12,7 +12,7 @@ #include #include -#include "types.hh" +#include "types/types.hh" #include "types/collection.hh" class user_type_impl; diff --git a/types/tuple.hh b/types/tuple.hh index 42bcfa33ab..cc065a335a 100644 --- a/types/tuple.hh +++ b/types/tuple.hh @@ -16,7 +16,7 @@ #include #include -#include "types.hh" +#include "types/types.hh" struct tuple_deserializing_iterator { public: diff --git a/types.cc b/types/types.cc similarity index 99% rename from types.cc rename to types/types.cc index 6a428ba61f..90d8f1e28e 100644 --- a/types.cc +++ b/types/types.cc @@ -16,7 +16,7 @@ #include "cql3/util.hh" #include "concrete_types.hh" #include -#include "types.hh" +#include "types/types.hh" #include "utils/exceptions.hh" #include "utils/serialization.hh" #include "vint-serialization.hh" diff --git a/types.hh b/types/types.hh similarity index 100% rename from types.hh rename to types/types.hh diff --git a/types/user.hh b/types/user.hh index 66d0a1634f..7cda91c0dc 100644 --- a/types/user.hh +++ b/types/user.hh @@ -8,7 +8,7 @@ #pragma once -#include "types.hh" +#include "types/types.hh" #include "types/tuple.hh" #include "data_dictionary/keyspace_element.hh"