bkietz commented on issue #46146:
URL: https://github.com/apache/arrow/issues/46146#issuecomment-2807122134

   This change seems fine to me; it doesn't seem to be used anywhere except 
type_test and it doesn't seem to be in any of the bindings. Just in case, I'd 
recommend not requiring `impl_->metadata_` to be non-null:
   
   ```c++
   Status SchemaBuilder::AddMetadata(const KeyValueMetadata& metadata) {
     impl_->metadata_ = impl_->metadata_ ? impl_->metadata_->Merge(metadata) : 
metadata.Copy();
     return Status::OK();
   }
   ```
   
   This way if any users *are* calling `AddMetadata` in order to set metadata, 
we won't surprise them with a segfault.


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to