Skip to content
Closed
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
11 changes: 7 additions & 4 deletions cpp/src/arrow/ipc/adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include <cstdint>
#include <memory>

#include "arrow/util/visibility.h"

namespace arrow {

class Array;
Expand Down Expand Up @@ -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<RowBatchReader>* out);
Expand Down
5 changes: 3 additions & 2 deletions cpp/src/arrow/ipc/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <string>

#include "arrow/util/macros.h"
#include "arrow/util/visibility.h"

namespace arrow {

Expand Down Expand Up @@ -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 };
Expand Down Expand Up @@ -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<MemoryMappedSource>* out);
Expand Down