alamb commented on code in PR #10289:
URL: https://github.com/apache/arrow-rs/pull/10289#discussion_r3559874659
##########
arrow-schema/src/ffi.rs:
##########
@@ -187,6 +187,12 @@ impl FFI_ArrowSchema {
I: IntoIterator<Item = (S, S)>,
S: AsRef<str>,
{
+ if self.private_data.is_null() {
Review Comment:
I don't understand this -- the code below *sets* private data
```rust
unsafe {
let mut private_data = Box::from_raw(self.private_data as *mut
SchemaPrivateData);
private_data.metadata = new_metadata;
self.private_data = Box::into_raw(private_data) as *mut c_void;
}
```
WHy does this function need private date to be non null?
--
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]