From b35c6a7077a60986a0bee2bbeea3ad1a55740431 Mon Sep 17 00:00:00 2001 From: RobinTF <83676088+RobinTF@users.noreply.github.com> Date: Sat, 18 May 2024 18:05:19 +0200 Subject: [PATCH] Try to fix compilation issue on macOS --- src/engine/Server.cpp | 4 ++-- src/engine/Server.h | 2 +- src/global/Constants.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/Server.cpp b/src/engine/Server.cpp index a710950aae..d53216d28e 100644 --- a/src/engine/Server.cpp +++ b/src/engine/Server.cpp @@ -645,7 +645,7 @@ boost::asio::awaitable Server::processQuery( } else if (containsParam("action", "binary_export")) { mediaType = MediaType::octetStream; } - std::optional maxSend = + std::optional maxSend = params.contains("send") ? std::optional{std::stoul(params.at("send"))} : std::nullopt; // Limit JSON requests by default @@ -827,7 +827,7 @@ Awaitable Server::computeInNewThread(Function function, net::awaitable> Server::parseAndPlan( const std::string& query, QueryExecutionContext& qec, SharedCancellationHandle handle, TimeLimit timeLimit, - std::optional maxSend) { + std::optional maxSend) { auto handleCopy = handle; // The usage of an `optional` here is required because of a limitation in diff --git a/src/engine/Server.h b/src/engine/Server.h index 0a56a712f0..a0c40be78e 100644 --- a/src/engine/Server.h +++ b/src/engine/Server.h @@ -184,7 +184,7 @@ class Server { net::awaitable> parseAndPlan( const std::string& query, QueryExecutionContext& qec, SharedCancellationHandle handle, TimeLimit timeLimit, - std::optional maxSend); + std::optional maxSend); /// Acquire the `CancellationHandle` for the given `QueryId`, start the /// watchdog and call `cancelAfterDeadline` to set the timeout after diff --git a/src/global/Constants.h b/src/global/Constants.h index c7b68d5735..06b0e4b6ee 100644 --- a/src/global/Constants.h +++ b/src/global/Constants.h @@ -23,7 +23,7 @@ static const ad_utility::MemorySize STXXL_DISK_SIZE_INDEX_BUILDER = 1_GB; static constexpr ad_utility::MemorySize DEFAULT_MEM_FOR_QUERIES = 4_GB; -static const size_t MAX_NOF_ROWS_IN_RESULT = 1'000'000; +constexpr uint64_t MAX_NOF_ROWS_IN_RESULT = 1'000'000; static const size_t MIN_WORD_PREFIX_SIZE = 4; static const char PREFIX_CHAR = '*';