raulcd commented on issue #44690:
URL: https://github.com/apache/arrow/issues/44690#issuecomment-2488280184

   I have zero knowledge here so bear with me if there is something obvious I 
am missing. I was trying to understand what the issue is and after some 
investigation it seems that memcpy [should just handle the size 
0](https://stackoverflow.com/a/3751937) without problem, could you expand on 
what would be the undefined behavior?
   Was your expectation to have some kind of check for length or am I 
misinterpreting the issue?
   ```
     Status AppendValues(const value_type* values, int64_t length,
                         const std::vector<bool>& is_valid) {
       if (length > 0) {
           ARROW_RETURN_NOT_OK(Reserve(length));
           data_builder_.UnsafeAppend(values, length);
           // length_ is update by these
           ArrayBuilder::UnsafeAppendToBitmap(is_valid);
       }
       return Status::OK();
     }
   ```


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