diff --git a/arrow-schema/src/fields.rs b/arrow-schema/src/fields.rs index 70cb1968e9a..f90632455fd 100644 --- a/arrow-schema/src/fields.rs +++ b/arrow-schema/src/fields.rs @@ -117,6 +117,8 @@ impl Fields { /// assert_eq!(fields.remove(1), Field::new("b", DataType::Int8, false).into()); /// assert_eq!(fields.len(), 2); /// ``` + #[deprecated(note = "Use SchemaBuilder::remove")] + #[doc(hidden)] pub fn remove(&mut self, index: usize) -> FieldRef { let mut builder = SchemaBuilder::from(Fields::from(&*self.0)); let field = builder.remove(index); diff --git a/arrow-schema/src/schema.rs b/arrow-schema/src/schema.rs index 711e4cb3314..e547e5df3a5 100644 --- a/arrow-schema/src/schema.rs +++ b/arrow-schema/src/schema.rs @@ -402,6 +402,9 @@ impl Schema { /// assert_eq!(schema.remove(1), Field::new("b", DataType::Int8, false).into()); /// assert_eq!(schema.fields.len(), 2); /// ``` + #[deprecated(note = "Use SchemaBuilder::remove")] + #[doc(hidden)] + #[allow(deprecated)] pub fn remove(&mut self, index: usize) -> FieldRef { self.fields.remove(index) }