XiangpengHao opened a new pull request, #5525:
URL: https://github.com/apache/arrow-rs/pull/5525
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases. You can
link an issue to this PR using the GitHub syntax. For example `Closes #123`
indicates that this PR will close issue #123.
-->
Part of #5506.
# Rationale for this change
Added necessary changes to handle the BinaryView and Utf8View in IPC
reader/writer.
<!--
Why are you proposing this change? If this is already explained clearly in
the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your
changes and offer better suggestions for fixes.
-->
# What changes are included in this PR?
The changes are slightly larger than expected because the BinaryView and
Utf8View has
[variadicBufferCounts](https://github.com/apache/arrow-rs/blob/master/format/Message.fbs#L117)
which no other types had before.
Currently implementation
[ignores](https://github.com/apache/arrow-rs/compare/master...XiangpengHao:arrow-rs:master#diff-e063d8ae2302328512f4cb22fc378f2903f88a250d64d270075f4892d62a2b60R1319)
the offset of Binary/Utf8View Array's offsets, meaning that the entire buffers
will be serialize to the IPC buffer. This might write more data than necessary.
Slicing and writing a view array to IPC buffer is non-trivial and was left as
future work.
In #5506, @alamb mentioned (3) the integration tests. I'm not entirely sure
how to do this. Should we generate some arrow data and commit to the testing
repository and then add more tests to the
`arrow-rs/arrow-integration-testing/tests /ipc_reader.rs`?
<!--
There is no need to duplicate the description in the issue here but it is
sometimes worth providing a summary of the individual changes in this PR.
-->
# Are there any user-facing changes?
I just learned the arrow memory layout today, so I expect quite a lot of
corner cases I didn't handle, please feel free to comment as you see anything
non-intuitive :-)
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
<!---
If there are any breaking changes to public APIs, please add the `breaking
change` label.
-->
--
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]