-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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-45263: [MATLAB] Add ability to construct RecordBatchStreamReader
from uint8
array
#45274
Merged
+144
−42
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rdBatchStreamReader MATLAB class.
…ytes constructor functions.
…roxy object is supplied to the RecordBatchStreamReader constructor.
github-actions
bot
added
Component: MATLAB
awaiting committer review
Awaiting committer review
labels
Jan 15, 2025
kou
reviewed
Jan 16, 2025
github-actions
bot
added
awaiting changes
Awaiting changes
and removed
awaiting committer review
Awaiting committer review
labels
Jan 16, 2025
kou
approved these changes
Jan 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
github-actions
bot
added
awaiting merge
Awaiting merge
and removed
awaiting changes
Awaiting changes
labels
Jan 17, 2025
+1 |
github-actions
bot
added
awaiting changes
Awaiting changes
and removed
awaiting merge
Awaiting merge
labels
Jan 17, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale for this change
To enable more workflows using the IPC Stream format in the MATLAB interface, this pull request adds the ability to construct a
RecordBatchStreamReader
from a MATLABuint8
array.This is helpful, for example, to enable Arrow-over-HTTP workflows in conjunction with the MATLAB
webread
function (which can return auint8
array from an HTTP request).This is a followup issue to #44923.
What changes are included in this PR?
static
"construction function"arrow.io.ipc.RecordBatchStreamReader.fromBytes(bytes)
.static
"construction function"arrow.io.ipc.RecordBatchStreamReader.fromFile(filename)
.arrow.io.ipc.RecordBatchStreamReader
constructor to no longer directly accept afilename
as an input. Instead, aarrow.io.ipc.RecordBatchStreamReader
can now only be directly constructed from alibmexclass.proxy.Proxy
instance. This mirrors the design of other MATLAB classes which wrapProxy
instances in the MATLAB interface. To constructRecordBatchStreamReader
objects from an Arrow IPC Stream file on disk, users can instead use the newstatic
"construction function"arrow.io.ipc.RecordBatchStreamReader.fromFile(filename)
.Are these changes tested?
Yes.
arrow/matlab/test/arrow/io/ipc/tRecordBatchStreamReader.m
to be parameterized over thefromFile
andfromBytes
"construction functions".RecordBatchStreamReader
constructor is called directly with an input that is not alibmexclass.proxy.Proxy
instance.Are there any user-facing changes?
Yes.
arrow.io.ipc.RecordBatchStreamReader
objects from an Arrow IPC Stream file on disk using the newstatic
"construction function"arrow.io.ipc.RecordBatchStreamReader.fromFile(filename)
.arrow.io.ipc.RecordBatchStreamReader
objects from an in-memory MATLABuint8
"bytes" array using the newstatic
"construction function"arrow.io.ipc.RecordBatchStreamReader.fromBytes(bytes)
.This PR includes breaking changes to public APIs.
This PR changes the signature of the public
arrow.io.ipc.RecordBatchStreamReader
constructor to no longer directly accept afilename
as an input. Instead, aarrow.io.ipc.RecordBatchStreamReader
can now only be directly constructed from alibmexclass.proxy.Proxy
instance. This mirrors the design of other MATLAB classes which wrapProxy
instances in the MATLAB interface. To constructRecordBatchStreamReader
objects from an Arrow IPC Stream file on disk, users can instead use the newstatic
"construction function"arrow.io.ipc.RecordBatchStreamReader.fromFile(filename)
.Future Directions
static
"construction function"arrow.io.ipc.RecordBatchStreamReader.fromBytes(bytes)
in an example to demonstrate how to read an Arrow IPC Stream from an HTTP endpoint as part of apache/arrow-experiments.Notes
RecordBatchStreamReader
fromuint8
array #45263