Skip to content

Commit c292994

Browse files
committed
Implement RecordBatchFileReader read method
1 parent 67b4f8a commit c292994

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

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

+14-2
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,22 @@
4343

4444
function schema = get.Schema(obj)
4545
proxyID = obj.Proxy.getSchema();
46-
proxy = libmexclass.proxy.Proxy(ID=proxyID, Name="arrow.tabular.proxy.Schema");
46+
proxyName = "arrow.tabular.proxy.Schema";
47+
proxy = libmexclass.proxy.Proxy(ID=proxyID, Name=proxyName);
4748
schema = arrow.tabular.Schema(proxy);
4849
end
49-
end
5050

51+
function rb = read(obj, index)
52+
arguments
53+
obj(1, 1) arrow.io.ipc.RecordBatchFileReader
54+
index(1, 1) int32
55+
end
5156

57+
args = struct(Index=index);
58+
proxyID = obj.Proxy.readRecordBatchAtIndex(args);
59+
proxyName = "arrow.tabular.proxy.RecordBatch";
60+
proxy = libmexclass.proxy.Proxy(ID=proxyID, Name=proxyName);
61+
rb = arrow.tabular.RecordBatch(proxy);
62+
end
63+
end
5264
end

0 commit comments

Comments
 (0)