Skip to content

Commit

Permalink
Update schema.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
berkaysynnada committed Nov 28, 2024
1 parent 4df9695 commit 2a0138b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions arrow-schema/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2a0138b

Please sign in to comment.