Struct datafusion::logical_plan::DFSchema
source · [−]pub struct DFSchema { /* private fields */ }
Expand description
DFSchema wraps an Arrow schema and adds relation names
Implementations
sourceimpl DFSchema
impl DFSchema
sourcepub fn new(fields: Vec<DFField, Global>) -> Result<DFSchema, DataFusionError>
pub fn new(fields: Vec<DFField, Global>) -> Result<DFSchema, DataFusionError>
Create a new DFSchema
sourcepub fn try_from_qualified_schema(
qualifier: &str,
schema: &Schema
) -> Result<DFSchema, DataFusionError>
pub fn try_from_qualified_schema(
qualifier: &str,
schema: &Schema
) -> Result<DFSchema, DataFusionError>
Create a DFSchema
from an Arrow schema
sourcepub fn fields(&self) -> &Vec<DFField, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn fields(&self) -> &Vec<DFField, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Get a list of fields
sourcepub fn field(&self, i: usize) -> &DFField
pub fn field(&self, i: usize) -> &DFField
Returns an immutable reference of a specific Field
instance selected using an
offset within the internal fields
vector
sourcepub fn index_of(&self, name: &str) -> Result<usize, DataFusionError>
pub fn index_of(&self, name: &str) -> Result<usize, DataFusionError>
Find the index of the column with the given unqualified name
sourcepub fn index_of_column(&self, col: &Column) -> Result<usize, DataFusionError>
pub fn index_of_column(&self, col: &Column) -> Result<usize, DataFusionError>
Find the index of the column with the given qualifier and name
sourcepub fn field_with_name(
&self,
qualifier: Option<&str>,
name: &str
) -> Result<&DFField, DataFusionError>
pub fn field_with_name(
&self,
qualifier: Option<&str>,
name: &str
) -> Result<&DFField, DataFusionError>
Find the field with the given name
sourcepub fn fields_with_unqualified_name(&self, name: &str) -> Vec<&DFField, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn fields_with_unqualified_name(&self, name: &str) -> Vec<&DFField, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Find all fields match the given name
sourcepub fn field_with_unqualified_name(
&self,
name: &str
) -> Result<&DFField, DataFusionError>
pub fn field_with_unqualified_name(
&self,
name: &str
) -> Result<&DFField, DataFusionError>
Find the field with the given name
sourcepub fn field_with_qualified_name(
&self,
qualifier: &str,
name: &str
) -> Result<&DFField, DataFusionError>
pub fn field_with_qualified_name(
&self,
qualifier: &str,
name: &str
) -> Result<&DFField, DataFusionError>
Find the field with the given qualified name
sourcepub fn field_from_column(
&self,
column: &Column
) -> Result<&DFField, DataFusionError>
pub fn field_from_column(
&self,
column: &Column
) -> Result<&DFField, DataFusionError>
Find the field with the given qualified column
sourcepub fn matches_arrow_schema(&self, arrow_schema: &Schema) -> bool
pub fn matches_arrow_schema(&self, arrow_schema: &Schema) -> bool
Check to see if unqualified field names matches field names in Arrow schema
sourcepub fn strip_qualifiers(self) -> DFSchema
pub fn strip_qualifiers(self) -> DFSchema
Strip all field qualifier in schema
sourcepub fn replace_qualifier(self, qualifier: &str) -> DFSchema
pub fn replace_qualifier(self, qualifier: &str) -> DFSchema
Replace all field qualifier with new value in schema
Trait Implementations
sourceimpl ExprSchema for DFSchema
impl ExprSchema for DFSchema
impl Eq for DFSchema
impl StructuralEq for DFSchema
impl StructuralPartialEq for DFSchema
Auto Trait Implementations
impl RefUnwindSafe for DFSchema
impl Send for DFSchema
impl Sync for DFSchema
impl Unpin for DFSchema
impl UnwindSafe for DFSchema
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more