-
Notifications
You must be signed in to change notification settings - Fork 49
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
Upgrade to Arrow 4.0.0 #198
Changes from all commits
afe6dd5
1e1a3e0
6f4b4a5
eb00f8a
7ac8710
0011a14
6930b51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,13 @@ include(GenerateExportHeader) | |
|
||
find_package(Arrow REQUIRED) | ||
find_package(Boost COMPONENTS filesystem regex system REQUIRED) | ||
find_package(Brotli REQUIRED) | ||
find_package(unofficial-brotli CONFIG REQUIRED) | ||
find_package(BZip2 REQUIRED) | ||
find_package(double-conversion CONFIG REQUIRED) | ||
find_package(gflags CONFIG REQUIRED) | ||
find_package(glog CONFIG REQUIRED) | ||
find_package(lz4 CONFIG REQUIRED) | ||
find_package(OpenSSL REQUIRED) | ||
find_package(re2 CONFIG REQUIRED) | ||
find_package(Snappy CONFIG REQUIRED) | ||
find_package(Thrift CONFIG REQUIRED) | ||
find_package(utf8proc REQUIRED) | ||
|
@@ -86,17 +86,17 @@ include_directories( | |
${PROJECT_BINARY_DIR} | ||
${ParquetCpp_INCLUDE_DIRS}) | ||
|
||
target_link_libraries(ParquetSharpNative | ||
target_link_libraries(ParquetSharpNative PRIVATE | ||
${ParquetCpp_LIBRARIES} | ||
${Arrow_LIBRARIES} | ||
${Boost_LIBRARIES} | ||
${Brotli_LIBRARIES} | ||
unofficial::brotli::brotlidec-static unofficial::brotli::brotlienc-static unofficial::brotli::brotlicommon-static | ||
BZip2::BZip2 | ||
${Crypto_LIBRARIES} | ||
double-conversion::double-conversion | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Arrow 4.0.0 has its own double-conversion. |
||
glog::glog | ||
lz4::lz4 | ||
${SSL_LIBRARIES} | ||
re2::re2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Arrow 4.0.0 now requires re2. |
||
Snappy::snappy | ||
thrift::thrift | ||
${utf8proc_LIBRARIES} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
#include "cpp/ParquetSharpExport.h" | ||
#include "ExceptionInfo.h" | ||
|
||
#include <arrow/util/key_value_metadata.h> | ||
#include <parquet/metadata.h> | ||
|
||
using namespace parquet; | ||
|
@@ -76,7 +77,7 @@ extern "C" | |
|
||
PARQUETSHARP_EXPORT void KeyValueMetadata_Free_Entries(const std::shared_ptr<const KeyValueMetadata>* key_value_metadata, const char** keys, const char** values) | ||
{ | ||
int64_t size = (*key_value_metadata)->size(); | ||
const int64_t size = (*key_value_metadata)->size(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not linked to the Arrow 4.0.0 upgrade, but it's better that way. |
||
|
||
for (int i = 0; i != size; ++i) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,11 +111,6 @@ extern "C" | |
TRYCATCH(*logical_type = new std::shared_ptr<const LogicalType>(LogicalType::None());) | ||
} | ||
|
||
PARQUETSHARP_EXPORT ExceptionInfo* LogicalType_Unknown(const std::shared_ptr<const LogicalType>** logical_type) | ||
{ | ||
TRYCATCH(*logical_type = new std::shared_ptr<const LogicalType>(LogicalType::Unknown());) | ||
} | ||
|
||
Comment on lines
-114
to
-118
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
// Typed properties | ||
PARQUETSHARP_EXPORT ExceptionInfo* DecimalLogicalType_Precision(const std::shared_ptr<const DecimalLogicalType>* logical_type, int32_t* precision) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
#pragma once | ||
|
||
#include <parquet/encryption.h> | ||
#include <parquet/encryption/encryption.h> | ||
#include <stdexcept> | ||
|
||
using namespace parquet; | ||
|
@@ -35,7 +35,7 @@ class ManagedDecryptionKeyRetriever final : public DecryptionKeyRetriever | |
free_gc_handle_(Handle); | ||
} | ||
|
||
std::string GetKey(const std::string& key_metadata) const override | ||
std::string GetKey(const std::string& key_metadata) override | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method signature changed in Arrow 4.0.0. |
||
{ | ||
const char* exception = nullptr; | ||
AesKey key; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,32 +29,6 @@ extern "C" | |
values_read);) \ | ||
} \ | ||
\ | ||
PARQUETSHARP_EXPORT ExceptionInfo* TypedColumnReader_ReadBatchSpaced_##ParquetType( \ | ||
std::shared_ptr<ColumnReader>* columnReader, \ | ||
int64_t batch_size, \ | ||
int16_t* def_levels, \ | ||
int16_t* rep_levels, \ | ||
NativeType* values, \ | ||
uint8_t* valid_bits, \ | ||
int64_t valid_bits_offset, \ | ||
int64_t* levels_read, \ | ||
int64_t* values_read, \ | ||
int64_t* null_count, \ | ||
int64_t* return_value) \ | ||
{ \ | ||
TRYCATCH( \ | ||
*levels_read = static_cast<ParquetType##Reader&>(**columnReader).ReadBatchSpaced( \ | ||
batch_size, \ | ||
def_levels, \ | ||
rep_levels, \ | ||
values, \ | ||
valid_bits, \ | ||
valid_bits_offset, \ | ||
levels_read, \ | ||
values_read, \ | ||
null_count);) \ | ||
} \ | ||
\ | ||
Comment on lines
-32
to
-57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ReadBatchSpaced has been deprecated in Arrow 4.0.0 because it was buggy and no one was using it. |
||
PARQUETSHARP_EXPORT ExceptionInfo* TypedColumnReader_Skip_##ParquetType( \ | ||
std::shared_ptr<ColumnReader>* columnReader, \ | ||
int64_t num_rows_to_skip, \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are now using vcpkg's brotli.