vibhatha commented on code in PR #43053:
URL: https://github.com/apache/arrow/pull/43053#discussion_r1694922931
##########
java/c/src/test/java/org/apache/arrow/c/RoundtripTest.java:
##########
@@ -951,6 +952,130 @@ public void testImportReleasedArray() {
}
}
+ private FieldVector getSlicedVector(FieldVector vector, int offset) {
+ // Consumer allocates empty structures
+ try (ArrowSchema consumerArrowSchema = ArrowSchema.allocateNew(allocator);
+ ArrowArray consumerArrowArray = ArrowArray.allocateNew(allocator)) {
+
+ // Producer creates structures from existing memory pointers
+ try (ArrowSchema arrowSchema =
ArrowSchema.wrap(consumerArrowSchema.memoryAddress());
+ ArrowArray arrowArray =
ArrowArray.wrap(consumerArrowArray.memoryAddress())) {
+ // Producer exports vector into the C Data Interface structures
+ Data.exportVector(allocator, vector, null, arrowArray, arrowSchema);
+ }
+ // consumerArrowArray.snapshot().offset = offset;
Review Comment:
I am still working on updating the test case as you recommended. Meaning, as
you have mentioned again here `manually tweaking snapshot` is what we have to
do. I am still working on it. I just pushed so that I can work from my other
device.
--
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]