lidavidm commented on code in PR #14346:
URL: https://github.com/apache/arrow/pull/14346#discussion_r990469990
##########
java/c/src/test/java/org/apache/arrow/c/RoundtripTest.java:
##########
@@ -673,8 +673,7 @@ public void testTable() {
Table table = new Table(vsr);
) {
// Producer creates structures from existing memory pointers
- try (ArrowSchema arrowSchema =
ArrowSchema.wrap(consumerArrowSchema.memoryAddress());
- ArrowArray arrowArray =
ArrowArray.wrap(consumerArrowArray.memoryAddress())) {
+ try (ArrowArray arrowArray =
ArrowArray.wrap(consumerArrowArray.memoryAddress())) {
Review Comment:
So on the contrary I think `exportTable` should be passed the `arrowSchema`
here, since below we import from `consumerArrowSchema`. If we never export to
it, it'll be uninitialized, and I don't know off the top of my head if the
buffer will be zeroed or just contain random bytes, but that could cause an
exception/crash.
--
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]