andishgar commented on issue #49740:
URL: https://github.com/apache/arrow/issues/49740#issuecomment-4699028395

   @pitrou
   
   This is the minimum C++ code to produce the error:
   
   ```c++
   TEST(CdataInterface, BinaryView) {
     arrow::BinaryViewBuilder builder;
     ASSERT_OK(builder.Append("1"));
     ASSERT_OK_AND_ASSIGN(auto array_0, builder.Finish());
     array_0->data()->buffers.push_back(nullptr);
     struct ArrowArray array_out;
     struct ArrowSchema schema_out;
     ASSERT_OK(arrow::ExportArray(*array_0, &array_out, &schema_out));
   }
   ```
   
   The root of the problem is the line below, which assumes all data buffers of 
BinaryView are non‑null:
   
https://github.com/apache/arrow/blob/e8b7b4e35e231a0fcdbfa74f6a6b0075108dd5dc/cpp/src/arrow/c/bridge.cc#L611
   
   I have a question: as far as I have read the specification, it does not 
mention whether the data buffer of BinaryViewType can be null or not. Is there 
any clarification for that in the Arrow specification? (If the data buffer can 
be null, the solution for this issue is only one line of code.)


-- 
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]

Reply via email to