diff --git a/cpp/src/arrow/ipc/adapter.h b/cpp/src/arrow/ipc/adapter.h index 0d2b77f5ace..a34a5c4fcc9 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,20 +56,21 @@ 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, - 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); // 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);