Skip to content

Commit fed62c3

Browse files
committed
Add Filename property to RecordBatchWriter
1 parent 3b3480e commit fed62c3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

matlab/src/matlab/+arrow/+io/+ipc/RecordBatchFileWriter.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,18 @@
2222
Proxy
2323
end
2424

25+
properties (SetAccess=private, GetAccess=public)
26+
Filename (1, 1) string
27+
end
28+
2529
methods
2630
function obj = RecordBatchFileWriter(filename, schema)
2731
arguments
2832
filename(1, 1) string {mustBeNonzeroLengthText}
2933
schema(1, 1) arrow.tabular.Schema
3034
end
31-
args = struct(Filename=filename, SchemaProxyID=schema.Proxy.ID);
35+
obj.Filename = filename;
36+
args = struct(Filename=obj.Filename, SchemaProxyID=schema.Proxy.ID);
3237
obj.Proxy = arrow.internal.proxy.create("arrow.io.ipc.proxy.RecordBatchFileWriter", args);
3338
end
3439

@@ -40,5 +45,7 @@ function write(obj, recordBatch)
4045
args = struct(RecordBatchProxyID=recordBatch.Proxy.ID);
4146
obj.Proxy.writeBatch(args);
4247
end
48+
4349
end
50+
4451
end

0 commit comments

Comments
 (0)