diff --git a/arrow-schema/src/schema.rs b/arrow-schema/src/schema.rs index cc3a8a308a83..c80e041db219 100644 --- a/arrow-schema/src/schema.rs +++ b/arrow-schema/src/schema.rs @@ -461,6 +461,17 @@ impl Schema { pub fn remove(&mut self, index: usize) -> FieldRef { self.fields.remove(index) } + + /// THIS METHOD IS ARAS ONLY + /// + /// Converts the fields of the batch to nullable. + pub fn make_fields_nullable(&mut self) { + let fields = self + .fields + .iter() + .map(|field| field.as_ref().clone().with_nullable(true)); + self.fields = Fields::from_iter(fields); + } } impl fmt::Display for Schema {