Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkovsky committed Jan 9, 2025
1 parent 5bfc297 commit 05a475b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions datafusion/common/src/dfschema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ impl QualifiedSchema {
Self::new(schema, field_qualifiers)
}

pub fn is_empty(&self) -> bool {
self.schema.fields.is_empty()
}

pub fn len(&self) -> usize {
self.schema.fields.len()
}
Expand Down Expand Up @@ -253,7 +257,7 @@ impl DFSchema {
///
/// Note this does not have the qualifier information
pub fn as_arrow(&self) -> &Schema {
&self.inner.schema.as_ref()
self.inner.schema.as_ref()
}

/// Return a reference to the inner Arrow [`SchemaRef`]
Expand All @@ -268,7 +272,7 @@ impl DFSchema {
metadata_schema: Option<QualifiedSchema>,
) -> Self {
self.metadata = metadata_schema;
return self;
self
}

/// Create a `DFSchema` from an Arrow schema where all the fields have a given qualifier
Expand Down

0 comments on commit 05a475b

Please sign in to comment.