Struct datafusion_common::DFField
source · pub struct DFField { /* private fields */ }
Expand description
DFField wraps an Arrow field and adds an optional qualifier
Implementations§
source§impl DFField
impl DFField
sourcepub fn new<R: Into<OwnedTableReference>>(
qualifier: Option<R>,
name: &str,
data_type: DataType,
nullable: bool
) -> Self
pub fn new<R: Into<OwnedTableReference>>( qualifier: Option<R>, name: &str, data_type: DataType, nullable: bool ) -> Self
Creates a new DFField
sourcepub fn new_unqualified(name: &str, data_type: DataType, nullable: bool) -> Self
pub fn new_unqualified(name: &str, data_type: DataType, nullable: bool) -> Self
Convenience method for creating new DFField
without a qualifier
sourcepub fn from_qualified<'a>(
qualifier: impl Into<TableReference<'a>>,
field: impl Into<FieldRef>
) -> Self
pub fn from_qualified<'a>( qualifier: impl Into<TableReference<'a>>, field: impl Into<FieldRef> ) -> Self
Create a qualified field from an existing Arrow field
sourcepub fn is_nullable(&self) -> bool
pub fn is_nullable(&self) -> bool
Indicates whether this DFField
supports null values
pub fn metadata(&self) -> &HashMap<String, String>
sourcepub fn qualified_name(&self) -> String
pub fn qualified_name(&self) -> String
Returns a string to the DFField
’s qualified name
sourcepub fn qualified_column(&self) -> Column
pub fn qualified_column(&self) -> Column
Builds a qualified column based on self
sourcepub fn unqualified_column(&self) -> Column
pub fn unqualified_column(&self) -> Column
Builds an unqualified column based on self
sourcepub fn qualifier(&self) -> Option<&OwnedTableReference>
pub fn qualifier(&self) -> Option<&OwnedTableReference>
Get the optional qualifier
sourcepub fn strip_qualifier(self) -> Self
pub fn strip_qualifier(self) -> Self
Return field with qualifier stripped
sourcepub fn with_nullable(self, nullable: bool) -> Self
pub fn with_nullable(self, nullable: bool) -> Self
Return field with nullable specified
sourcepub fn with_metadata(self, metadata: HashMap<String, String>) -> Self
pub fn with_metadata(self, metadata: HashMap<String, String>) -> Self
Return field with new metadata
Trait Implementations§
source§impl PartialEq<DFField> for DFField
impl PartialEq<DFField> for DFField
impl Eq for DFField
impl StructuralEq for DFField
impl StructuralPartialEq for DFField
Auto Trait Implementations§
impl RefUnwindSafe for DFField
impl Send for DFField
impl Sync for DFField
impl Unpin for DFField
impl UnwindSafe for DFField
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.