File tree 3 files changed +15
-4
lines changed
cpp/arrow/matlab/io/ipc/proxy
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 25
25
26
26
#include " libmexclass/proxy/ProxyManager.h"
27
27
28
+ #include < iostream>
29
+
28
30
namespace arrow ::matlab::io::ipc::proxy {
29
31
30
32
RecordBatchFileWriter::RecordBatchFileWriter (std::shared_ptr<arrow::ipc::RecordBatchWriter> writer) : writer{std::move (writer)} {
31
- REGISTER_METHOD (RecordBatchFileWriter, write_batch );
33
+ REGISTER_METHOD (RecordBatchFileWriter, writeBatch );
32
34
}
33
35
34
36
libmexclass::proxy::MakeResult RecordBatchFileWriter::make (
@@ -62,7 +64,7 @@ libmexclass::proxy::MakeResult RecordBatchFileWriter::make(
62
64
return std::make_shared<RecordBatchFileWriterProxy>(std::move (writer));
63
65
}
64
66
65
- void RecordBatchFileWriter::write_batch (libmexclass::proxy::method::Context& context) {
67
+ void RecordBatchFileWriter::writeBatch (libmexclass::proxy::method::Context& context) {
66
68
namespace mda = ::matlab::data;
67
69
using RecordBatchProxy = ::arrow::matlab::tabular::proxy::RecordBatch;
68
70
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class RecordBatchFileWriter : public libmexclass::proxy::Proxy {
33
33
34
34
protected:
35
35
36
- void write_batch (libmexclass::proxy::method::Context& context);
36
+ void writeBatch (libmexclass::proxy::method::Context& context);
37
37
38
38
std::shared_ptr<arrow::ipc::RecordBatchWriter> writer;
39
39
};
Original file line number Diff line number Diff line change 29
29
schema (1 , 1 ) arrow.tabular.Schema
30
30
end
31
31
args = struct(Filename = filename , SchemaProxyID= schema .Proxy .ID );
32
- obj.Proxy = arrow .internal .proxy .create(" arrow.io.csv.proxy.TableReader" , args );
32
+ obj.Proxy = arrow .internal .proxy .create(" arrow.io.ipc.proxy.RecordBatchFileWriter" , args );
33
+ end
34
+
35
+ function write(obj , recordBatch )
36
+ arguments
37
+ obj (1 , 1 ) arrow.io.ipc.RecordBatchFileWriter
38
+ recordBatch (1 , 1 ) arrow.tabular.RecordBatch
39
+ end
40
+ args = struct(RecordBatchProxyID = recordBatch .Proxy .ID );
41
+ obj .Proxy .writeBatch(args );
33
42
end
34
43
end
35
44
end
You can’t perform that action at this time.
0 commit comments