brunal commented on code in PR #46408:
URL: https://github.com/apache/arrow/pull/46408#discussion_r2109886186
##########
cpp/src/arrow/ipc/read_write_test.cc:
##########
@@ -579,6 +579,40 @@ TEST_F(TestIpcRoundTrip, SpecificMetadataVersion) {
TestMetadataVersion(MetadataVersion::V5);
}
+TEST_F(TestIpcRoundTrip, AlienSlice) {
+ // This tests serialization of a sliced ListArray that got sliced "the Rust
+ // way": by slicing the value_offsets buffer, but keeping top-level offset at
+ // 0.
+
+ // Values buffer [1, 2, 3, 4, 5]
+ TypedBufferBuilder<int32_t> values_builder;
+ ASSERT_OK(values_builder.Reserve(5));
+ for (int32_t i = 1; i <= 5; i++) {
+ ASSERT_OK(values_builder.Append(i));
+ }
+ ASSERT_OK_AND_ASSIGN(auto values_buffer, values_builder.Finish());
Review Comment:
That gives me an Array though and not a Buffer. I'd have to go fetch its
buffers[0] and I'm not sure that's the best thing to do.
--
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]