Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-44922: [MATLAB] Add IPC RecordBatchStreamFileWriter MATLAB class #44925

Merged
merged 20 commits into from
Dec 4, 2024

Conversation

sgilmore10
Copy link
Member

@sgilmore10 sgilmore10 commented Dec 3, 2024

Rationale for this change

To enable support for the IPC Streaming format in the MATLAB interface, we should add a RecordBatchStreamWriter class.

What changes are included in this PR?

Added arrow.io.ipc.RecordBatchStreamWriter class.

Example Usage:

>> city = ["Boston" "Seattle" "Denver" "Juno" "Anchorage" "Chicago"]';
>> daylength = duration(["15:17:01" "15:59:16" "14:59:14" "19:21:23" "14:18:24" "15:13:39"])';
>> matlabTable = table(city, daylength, VariableNames=["City", "DayLength"]);
>> recordBatch1 = arrow.recordBatch(matlabTable(1:4, :))
>> recordBatch2 = arrow.recordBatch(matlabTable(5:end, :));

>> writer = arrow.io.ipc.RecordBatchStreamWriter("daylight.arrow", recordBatch1.Schema);
>> writer.writeRecordBatch(recordBatch1);
>> writer.writeRecordBatch(recordBatch2);
>> writer.close();

Are these changes tested?

Yes. I Parameterized the test cases in test/arrow/io/ipc/tRecordBatchWriter.m to test the behavior of both arrow.io.ipc.RecordBatchFileWriter AND arrow.io.ipc.RecordBatchStreamWriter.

Are there any user-facing changes?

Yes. Users can now use arrow.io.ipc.RecordBatchStreamWriter to serialize RecordBatches/Tables to the Arrow IPC Streaming format.

Future Directions

  1. [MATLAB] Add IPC RecordBatchStreamReader MATLAB class #44923

@sgilmore10 sgilmore10 marked this pull request as ready for review December 3, 2024 21:59
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Dec 4, 2024
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Dec 4, 2024
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Dec 4, 2024
Copy link
Member

@kevingurney kevingurney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good! Thanks, @sgilmore10!

matlab/src/matlab/+arrow/+io/+ipc/RecordBatchWriter.m Outdated Show resolved Hide resolved
matlab/src/matlab/+arrow/+io/+ipc/RecordBatchWriter.m Outdated Show resolved Hide resolved
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Dec 4, 2024
Copy link
Member

@kevingurney kevingurney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@github-actions github-actions bot added awaiting changes Awaiting changes awaiting merge Awaiting merge and removed awaiting change review Awaiting change review awaiting changes Awaiting changes labels Dec 4, 2024
@sgilmore10 sgilmore10 merged commit 2b5a802 into apache:main Dec 4, 2024
9 checks passed
@sgilmore10 sgilmore10 removed the awaiting merge Awaiting merge label Dec 4, 2024
@sgilmore10 sgilmore10 deleted the GH-44922 branch December 4, 2024 16:09
Copy link

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 2b5a802.

There were 132 benchmark results with an error:

There were 2 benchmark results indicating a performance regression:

The full Conbench report has more details. It also includes information about 29 possible false positives for unstable benchmarks that are known to sometimes produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants