Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-31454 Enable Parquet interface in client tools #18562

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading