diff --git a/cmake_modules/commonSetup.cmake b/cmake_modules/commonSetup.cmake index 660b68fefd9..65920459734 100644 --- a/cmake_modules/commonSetup.cmake +++ b/cmake_modules/commonSetup.cmake @@ -135,6 +135,7 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "") if ( CLIENTTOOLS_ONLY ) set(PLATFORM OFF) set(DEVEL OFF) + set(USE_PARQUET OFF) endif() # The following options need to be set after the project() command diff --git a/common/thorhelper/thorread.cpp b/common/thorhelper/thorread.cpp index d1dd5169a69..e05ed699117 100644 --- a/common/thorhelper/thorread.cpp +++ b/common/thorhelper/thorread.cpp @@ -2037,7 +2037,7 @@ IDiskRowReader * doCreateLocalDiskReader(const char * format, IDiskReadMapping * { auto foundReader = genericFileTypeMap.find(format); - if (foundReader != genericFileTypeMap.end()) + if (foundReader != genericFileTypeMap.end() && foundReader->second) return foundReader->second(_mapping); UNIMPLEMENTED; @@ -2087,6 +2087,8 @@ MODULE_INIT(INIT_PRIORITY_STANDARD) genericFileTypeMap.emplace("xml", [](IDiskReadMapping * _mapping) { return new XmlDiskRowReader(_mapping); }); #ifdef _USE_PARQUET genericFileTypeMap.emplace(PARQUET_FILE_TYPE_NAME, [](IDiskReadMapping * _mapping) { return new ParquetDiskRowReader(_mapping); }); +#else + genericFileTypeMap.emplace(PARQUET_FILE_TYPE_NAME, [](IDiskReadMapping * _mapping) { return nullptr; }); #endif // Stuff the file type names that were just instantiated into a list; diff --git a/common/thorhelper/thorread.hpp b/common/thorhelper/thorread.hpp index ab6101e2a5b..8179354c70b 100644 --- a/common/thorhelper/thorread.hpp +++ b/common/thorhelper/thorread.hpp @@ -27,6 +27,8 @@ #include "jrowstream.hpp" #include "rtlkey.hpp" +#define PARQUET_FILE_TYPE_NAME "parquet" + //--- Classes and interfaces for reading instances of files //The following is constant for the life of a disk read activity interface IDiskReadOutputMapping : public IInterface diff --git a/plugins/parquet/parquetembed.hpp b/plugins/parquet/parquetembed.hpp index 39a3e3c5aef..7becd2324db 100644 --- a/plugins/parquet/parquetembed.hpp +++ b/plugins/parquet/parquetembed.hpp @@ -45,8 +45,6 @@ extern void UNSUPPORTED(const char *feature) __attribute__((noreturn)); extern void failx(const char *msg, ...) __attribute__((noreturn)) __attribute__((format(printf, 1, 2))); extern void fail(const char *msg) __attribute__((noreturn)); -#define PARQUET_FILE_TYPE_NAME "parquet" - #define reportIfFailure(st) \ if (!st.ok()) \ { \