kevingurney commented on code in PR #45973: URL: https://github.com/apache/arrow/pull/45973#discussion_r2029335846
########## matlab/doc/matlab_interface_for_apache_arrow_design.md: ########## @@ -133,23 +121,36 @@ Alternatively, they could directly convert from an existing MATLAB `table` to an >> T = table(Weight, Radius, Density); % Create a MATLAB table ->> AT = arrow.matlab2arrow(T); % Create an arrow.Table +>> AT = arrow.table(T); % Create an arrow.Table ``` -To serialize the `arrow.Table`, `AT`, to a file (e.g. Feather) on disk, the user could then instantiate an `arrow.FeatherTableWriter`. + +To serialize the `arrow.Table`, `AT`, to a file (e.g. Feather) on disk, the user could then instantiate an `arrow.io.ipc.RecordBatchFileWriter`. ###### Example Code: ``` matlab ->> featherTableWriter = arrow.FeatherTableWriter(); +% create a RecordBatch out of the table from the previous example +>> recordBatch = arrow.recordBatch(AT); +>> filename = fullfile(pwd, "data.arrow"); ->> featherTableWriter.write(AT, "data.feather"); +% write the RecordBatch schema and the RecordBatch itself +>> writer = arrow.io.ipc.RecordBatchFileWriter(filename, recordBatch.Schema); +>> writer.writeRecordBatch(recordBatch); + +% close the writer to enable reading +>> writer.close(); ``` -The Feather file could then be read and operated on by an external process like Rust or Go. To read it back into MATLAB after modification by another process, the user could instantiate an `arrow.FeatherTableReader`. +The Feather file could then be read and operated on by an external process like Rust or Go. To read it back into MATLAB after modification by another process, the user could instantiate an `arrow.io.ipc.RecordBatchFileReader`. Review Comment: Marking as resolved. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
