Skip to content

Commit dc79ceb

Browse files
jihoonsonwesm
authored andcommitted
ARROW-244: Some global APIs of IPC module should be visible to the outside
Author: Jihoon Son <jihoonson@apache.org> Closes #109 from jihoonson/ARROW-244 and squashes the following commits: 51d9a87 [Jihoon Son] Make line length shorter than 90 2da5466 [Jihoon Son] Make some APIs of IPC module visible
1 parent a2fb756 commit dc79ceb

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

cpp/src/arrow/ipc/adapter.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include <cstdint>
2525
#include <memory>
2626

27+
#include "arrow/util/visibility.h"
28+
2729
namespace arrow {
2830

2931
class Array;
@@ -54,20 +56,21 @@ constexpr int kMaxIpcRecursionDepth = 64;
5456
//
5557
// Finally, the memory offset to the start of the metadata / data header is
5658
// returned in an out-variable
57-
Status WriteRowBatch(MemorySource* dst, const RowBatch* batch, int64_t position,
58-
int64_t* header_offset, int max_recursion_depth = kMaxIpcRecursionDepth);
59+
ARROW_EXPORT Status WriteRowBatch(MemorySource* dst, const RowBatch* batch,
60+
int64_t position, int64_t* header_offset,
61+
int max_recursion_depth = kMaxIpcRecursionDepth);
5962

6063
// int64_t GetRowBatchMetadata(const RowBatch* batch);
6164

6265
// Compute the precise number of bytes needed in a contiguous memory segment to
6366
// write the row batch. This involves generating the complete serialized
6467
// Flatbuffers metadata.
65-
Status GetRowBatchSize(const RowBatch* batch, int64_t* size);
68+
ARROW_EXPORT Status GetRowBatchSize(const RowBatch* batch, int64_t* size);
6669

6770
// ----------------------------------------------------------------------
6871
// "Read" path; does not copy data if the MemorySource does not
6972

70-
class RowBatchReader {
73+
class ARROW_EXPORT RowBatchReader {
7174
public:
7275
static Status Open(
7376
MemorySource* source, int64_t position, std::shared_ptr<RowBatchReader>* out);

cpp/src/arrow/ipc/memory.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <string>
2626

2727
#include "arrow/util/macros.h"
28+
#include "arrow/util/visibility.h"
2829

2930
namespace arrow {
3031

@@ -69,7 +70,7 @@ class BufferOutputStream : public OutputStream {
6970
int64_t position_;
7071
};
7172

72-
class MemorySource {
73+
class ARROW_EXPORT MemorySource {
7374
public:
7475
// Indicates the access permissions of the memory source
7576
enum AccessMode { READ_ONLY, READ_WRITE };
@@ -100,7 +101,7 @@ class MemorySource {
100101
};
101102

102103
// A memory source that uses memory-mapped files for memory interactions
103-
class MemoryMappedSource : public MemorySource {
104+
class ARROW_EXPORT MemoryMappedSource : public MemorySource {
104105
public:
105106
static Status Open(const std::string& path, AccessMode access_mode,
106107
std::shared_ptr<MemoryMappedSource>* out);

0 commit comments

Comments
 (0)