Struct polars::prelude::datatypes::ArrowField [−]
pub struct ArrowField { /* fields omitted */ }
Expand description
Contains the meta-data for a single relative type.
The Schema
object is an ordered collection of Field
objects.
Implementations
impl Field
impl Field
Creates a new field
pub fn set_metadata(&mut self, metadata: Option<BTreeMap<String, String>>)
pub fn set_metadata(&mut self, metadata: Option<BTreeMap<String, String>>)
Sets the Field
’s optional custom metadata.
The metadata is set as None
for empty map.
Returns the immutable reference to the Field
’s optional custom metadata.
pub const fn is_nullable(&self) -> bool
pub const fn is_nullable(&self) -> bool
Indicates whether this Field
supports null values.
pub const fn dict_is_ordered(&self) -> Option<bool>
pub const fn dict_is_ordered(&self) -> Option<bool>
Returns whether this Field
’s dictionary is ordered, if this is a dictionary type.
Parse a Field
definition from a JSON representation.
Merge field into self if it is compatible. Struct will be merged recursively.
NOTE: self
may be updated to unexpected state in case of merge failure.
Example:
use arrow::datatypes::*; let mut field = Field::new("c1", DataType::Int64, false); assert!(field.try_merge(&Field::new("c1", DataType::Int64, true)).is_ok()); assert!(field.is_nullable());
Trait Implementations
impl<'de> Deserialize<'de> for Field
impl<'de> Deserialize<'de> for Field
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Field, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Field, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Convert an IPC Field to Arrow Field
impl PartialOrd<Field> for Field
impl PartialOrd<Field> for Field
pub fn partial_cmp(&self, other: &Field) -> Option<Ordering>
pub fn partial_cmp(&self, other: &Field) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralEq for Field
impl StructuralPartialEq for Field
Auto Trait Implementations
impl RefUnwindSafe for Field
impl UnwindSafe for Field
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V