Skip to content

Commit

Permalink
HPCC-31454 Enable Parquet interface in client tools
Browse files Browse the repository at this point in the history
Shared library is not available in client tools, but it can at least be referenced in ECL code.
  • Loading branch information
dcamper committed Apr 19, 2024
1 parent 2ca3375 commit dc3bba5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 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: 1 addition & 1 deletion plugins/parquet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##############################################################################

# HPCC SYSTEMS software Copyright (C) 2022 HPCC Systems®.
# HPCC SYSTEMS software Copyright (C) 2022 HPCC Systems¨.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
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 dc3bba5

Please sign in to comment.