WillAyd commented on code in PR #1148:
URL: https://github.com/apache/arrow-adbc/pull/1148#discussion_r1342915322
##########
c/driver/postgresql/postgres_copy_reader_test.cc:
##########
@@ -136,21 +137,19 @@ TEST(PostgresCopyUtilsTest, PostgresCopyWriteBoolean) {
PostgresCopyStreamWriteTester tester;
ASSERT_EQ(tester.Init(&schema.value, &array.value), NANOARROW_OK);
- struct ArrowBuffer buffer;
- ArrowBufferInit(&buffer);
- ArrowBufferReserve(&buffer, sizeof(kTestPgCopyBoolean));
- uint8_t* cursor = buffer.data;
+ ArrowBufferInit(&buffer.value);
+ ArrowBufferReserve(&buffer.value, sizeof(kTestPgCopyBoolean));
+ uint8_t* cursor = buffer->data;
Review Comment:
Still not sure of the API here; right now things are definitely broken if we
do not provide a suitably sized buffer into the writer, and the writer in its
current implementation advances the `data` pointer member of the provided
buffer.
The test at least resets the data member to its original position so things
are properly free'd, but not quite sure how to handle the "needs resize" case
(for another PR)
--
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]