From 2da54661d30a0923387647da677a17d3726dfdc9 Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Wed, 27 Jul 2016 22:47:05 +0900 Subject: [PATCH 1/2] Make some APIs of IPC module visible --- cpp/src/arrow/ipc/adapter.h | 8 +++++--- cpp/src/arrow/ipc/memory.h | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cpp/src/arrow/ipc/adapter.h b/cpp/src/arrow/ipc/adapter.h index 0d2b77f5ace..dcc22f1d188 100644 --- a/cpp/src/arrow/ipc/adapter.h +++ b/cpp/src/arrow/ipc/adapter.h @@ -24,6 +24,8 @@ #include #include +#include "arrow/util/visibility.h" + namespace arrow { class Array; @@ -54,7 +56,7 @@ constexpr int kMaxIpcRecursionDepth = 64; // // Finally, the memory offset to the start of the metadata / data header is // returned in an out-variable -Status WriteRowBatch(MemorySource* dst, const RowBatch* batch, int64_t position, +ARROW_EXPORT Status WriteRowBatch(MemorySource* dst, const RowBatch* batch, int64_t position, int64_t* header_offset, int max_recursion_depth = kMaxIpcRecursionDepth); // int64_t GetRowBatchMetadata(const RowBatch* batch); @@ -62,12 +64,12 @@ Status WriteRowBatch(MemorySource* dst, const RowBatch* batch, int64_t position, // Compute the precise number of bytes needed in a contiguous memory segment to // write the row batch. This involves generating the complete serialized // Flatbuffers metadata. -Status GetRowBatchSize(const RowBatch* batch, int64_t* size); +ARROW_EXPORT Status GetRowBatchSize(const RowBatch* batch, int64_t* size); // ---------------------------------------------------------------------- // "Read" path; does not copy data if the MemorySource does not -class RowBatchReader { +class ARROW_EXPORT RowBatchReader { public: static Status Open( MemorySource* source, int64_t position, std::shared_ptr* out); diff --git a/cpp/src/arrow/ipc/memory.h b/cpp/src/arrow/ipc/memory.h index c6fd7a71899..377401d85c0 100644 --- a/cpp/src/arrow/ipc/memory.h +++ b/cpp/src/arrow/ipc/memory.h @@ -25,6 +25,7 @@ #include #include "arrow/util/macros.h" +#include "arrow/util/visibility.h" namespace arrow { @@ -69,7 +70,7 @@ class BufferOutputStream : public OutputStream { int64_t position_; }; -class MemorySource { +class ARROW_EXPORT MemorySource { public: // Indicates the access permissions of the memory source enum AccessMode { READ_ONLY, READ_WRITE }; @@ -100,7 +101,7 @@ class MemorySource { }; // A memory source that uses memory-mapped files for memory interactions -class MemoryMappedSource : public MemorySource { +class ARROW_EXPORT MemoryMappedSource : public MemorySource { public: static Status Open(const std::string& path, AccessMode access_mode, std::shared_ptr* out); From 51d9a87f59c00ec83f20f3948eb2f8519c8ff243 Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Wed, 27 Jul 2016 23:06:28 +0900 Subject: [PATCH 2/2] Make line length shorter than 90 --- cpp/src/arrow/ipc/adapter.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp/src/arrow/ipc/adapter.h b/cpp/src/arrow/ipc/adapter.h index dcc22f1d188..a34a5c4fcc9 100644 --- a/cpp/src/arrow/ipc/adapter.h +++ b/cpp/src/arrow/ipc/adapter.h @@ -56,8 +56,9 @@ constexpr int kMaxIpcRecursionDepth = 64; // // Finally, the memory offset to the start of the metadata / data header is // returned in an out-variable -ARROW_EXPORT Status WriteRowBatch(MemorySource* dst, const RowBatch* batch, int64_t position, - int64_t* header_offset, int max_recursion_depth = kMaxIpcRecursionDepth); +ARROW_EXPORT Status WriteRowBatch(MemorySource* dst, const RowBatch* batch, + int64_t position, int64_t* header_offset, + int max_recursion_depth = kMaxIpcRecursionDepth); // int64_t GetRowBatchMetadata(const RowBatch* batch);