Skip to content

Commit 00a4c9e

Browse files
authored
refactor(clp-s): Split clp-s into several smaller libraries to ease re-use in other projects. (#924)
1 parent 0b2c5a7 commit 00a4c9e

38 files changed

+775
-582
lines changed

components/core/.clang-format

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ IncludeCategories:
44
# NOTE: A header is grouped by first matching regex
55
# Library headers. Update when adding new libraries.
66
# NOTE: clang-format retains leading white-space on a line in violation of the YAML spec.
7-
- Regex: "<(absl|antlr4|archive|boost|bsoncxx|catch2|curl|date|fmt|log_surgeon|lzma|mongocxx\
8-
|msgpack|mysql|nlohmann|openssl|outcome|regex_utils|simdjson|spdlog|sqlite3|string_utils|yaml-cpp\
9-
|ystdlib|zstd)"
7+
- Regex: "<(absl|antlr4|archive|boost|bsoncxx|catch2|clp_s|curl|date|fmt|log_surgeon|lzma\
8+
|mongocxx|msgpack|mysql|nlohmann|openssl|outcome|regex_utils|simdjson|spdlog|sqlite3|string_utils\
9+
|yaml-cpp|ystdlib|zstd)"
1010
Priority: 3
1111
# C system headers
1212
- Regex: "^<.+\\.h>"

components/core/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ set(SOURCE_FILES_clp_s_unitTest
315315
src/clp_s/JsonFileIterator.hpp
316316
src/clp_s/JsonParser.cpp
317317
src/clp_s/JsonParser.hpp
318+
src/clp_s/OutputHandlerImpl.cpp
319+
src/clp_s/OutputHandlerImpl.hpp
318320
src/clp_s/PackedStreamReader.cpp
319321
src/clp_s/PackedStreamReader.hpp
320322
src/clp_s/RangeIndexWriter.cpp
@@ -343,7 +345,6 @@ set(SOURCE_FILES_clp_s_unitTest
343345
src/clp_s/search/EvaluateTimestampIndex.hpp
344346
src/clp_s/search/Output.cpp
345347
src/clp_s/search/Output.hpp
346-
src/clp_s/search/OutputHandler.cpp
347348
src/clp_s/search/OutputHandler.hpp
348349
src/clp_s/search/Projection.cpp
349350
src/clp_s/search/Projection.hpp
@@ -685,18 +686,18 @@ target_link_libraries(unitTest
685686
Catch2::Catch2
686687
${CURL_LIBRARIES}
687688
clp_s::search::ast
688-
clp_s::TimestampPattern
689+
clp_s::search::kql
690+
clp_s::search::sql
691+
clp_s::timestamp_pattern
689692
date::date
690693
fmt::fmt
691-
kql
692694
log_surgeon::log_surgeon
693695
LibArchive::LibArchive
694696
MariaDBClient::MariaDBClient
695697
${MONGOCXX_TARGET}
696698
nlohmann_json::nlohmann_json
697699
simdjson::simdjson
698700
spdlog::spdlog
699-
sql
700701
OpenSSL::Crypto
701702
${sqlite_LIBRARY_DEPENDENCIES}
702703
${STD_FS_LIBS}

components/core/src/clp_s/ArchiveReaderAdaptor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "archive_constants.hpp"
1919
#include "InputConfig.hpp"
2020
#include "RangeIndexWriter.hpp"
21-
#include "ReaderUtils.hpp"
2221
#include "SingleFileArchiveDefs.hpp"
2322

2423
namespace clp_s {
@@ -261,7 +260,7 @@ std::shared_ptr<clp::ReaderInterface> ArchiveReaderAdaptor::try_create_reader_at
261260
return nullptr;
262261
}
263262
} else {
264-
return ReaderUtils::try_create_reader(m_archive_path, m_network_auth);
263+
return try_create_reader(m_archive_path, m_network_auth);
265264
}
266265
}
267266

components/core/src/clp_s/ArchiveWriter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <sstream>
66

77
#include <nlohmann/json.hpp>
8+
#include <spdlog/spdlog.h>
89

910
#include "../clp/streaming_archive/Constants.hpp"
1011
#include "archive_constants.hpp"

0 commit comments

Comments
 (0)