Skip to content

Commit

Permalink
Merge pull request #18562 from dcamper/hpcc-31454-parquet-clienttools
Browse files Browse the repository at this point in the history
HPCC-31454 Enable Parquet interface in client tools

Reviewed-By: Jack Del Vecchio
Reviewed-by: Gordon Smith <[email protected]>
Reviewed-by: Gavin Halliday <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Apr 23, 2024
2 parents 2ca3375 + 97b0560 commit 442adb4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmake_modules/commonSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion common/thorhelper/thorread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions common/thorhelper/thorread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions plugins/parquet/parquetembed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) \
{ \
Expand Down

0 comments on commit 442adb4

Please sign in to comment.