vibhatha commented on code in PR #43053:
URL: https://github.com/apache/arrow/pull/43053#discussion_r1694923296
##########
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:
Sorry about the confusion. Still addressing reviews.
--
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]