Struct arrow::datatypes::Field[][src]

pub struct Field { /* fields omitted */ }
Expand description

Contains the meta-data for a single relative type.

The Schema object is an ordered collection of Field objects.

Implementations

Creates a new field

Creates a new field

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.

Returns an immutable reference to the Field’s name.

Returns an immutable reference to the Field’s data-type.

Indicates whether this Field supports null values.

Returns the dictionary ID, if this is a dictionary type.

Returns whether this Field’s dictionary is ordered, if this is a dictionary type.

Parse a Field definition from a JSON representation.

Generate a JSON representation of the Field.

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());

Check to see if self is a superset of other field. Superset is defined as:

  • if nullability doesn’t match, self needs to be nullable
  • self.metadata is a superset of other.metadata
  • all other fields are equal

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Convert an IPC Field to Arrow Field

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.