kou opened a new issue, #46146:
URL: https://github.com/apache/arrow/issues/46146

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   
https://github.com/apache/arrow/blob/4d6b3a973850c63c2a3638d6a708de0e40579378/cpp/src/arrow/type.cc#L2643-L2646
   
   I think that we use use `SetMetadata()` or something not `AddMetadata()` for 
this behavior. For example, `AddField()` adds a field not replaces a field:
   
   
https://github.com/apache/arrow/blob/4d6b3a973850c63c2a3638d6a708de0e40579378/cpp/src/arrow/type.cc#L2618-L2620
   
   Can we rename `AddMetadata()` (deprecate `AddMetadata()` for now and remove 
it) to `SetMetadata()`?
   
   Or can we add `SetMetadata()` and change the current `AddMetadata()` to the 
following?
   
   ```cpp
   Status SchemaBuilder::AddMetadata(const KeyValueMetadata& metadata) {
     impl_->metadata_ = impl_->metadata_->Merge(metadata);
     return Status::OK();
   }
   ```
   
   ### Component(s)
   
   C++


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

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

Reply via email to