This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 3c8d8db68 chore: delete wrong comment and refactor set_metadata in
`Field` (#3630)
3c8d8db68 is described below
commit 3c8d8db68fdbf94b82d6b178e10c8580c0c75d04
Author: chunshao.rcs <[email protected]>
AuthorDate: Mon Jan 30 14:24:27 2023 +0800
chore: delete wrong comment and refactor set_metadata in `Field` (#3630)
---
arrow-schema/src/field.rs | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arrow-schema/src/field.rs b/arrow-schema/src/field.rs
index 8dcb8cea9..b687b629a 100644
--- a/arrow-schema/src/field.rs
+++ b/arrow-schema/src/field.rs
@@ -142,13 +142,9 @@ impl Field {
}
/// Sets the `Field`'s optional custom metadata.
- /// The metadata is set as `None` for empty map.
#[inline]
pub fn set_metadata(&mut self, metadata: HashMap<String, String>) {
- self.metadata = HashMap::default();
- if !metadata.is_empty() {
- self.metadata = metadata;
- }
+ self.metadata = metadata;
}
/// Sets the metadata of this `Field` to be `metadata` and returns self