Skip to main content

FileType

Struct FileType 

Source
pub struct FileType;
Expand description

Arrow extension type for the Parquet FILE logical type.

A FILE value is a reference to a range of bytes, stored inline or in an external file. Its Arrow storage type is a struct whose fields are a subset of the following, each nullable, identified by name, in any order:

FieldArrow type
uriUtf8, LargeUtf8, or Utf8View
offsetInt64
sizeInt64
content_typeUtf8, LargeUtf8, or Utf8View
checksumUtf8, LargeUtf8, or Utf8View
inlineBinary, LargeBinary, or BinaryView

When reading, a FILE-annotated group is returned as a struct with this extension type. When writing, a struct field with this extension type is written as a FILE-annotated group.

If the file has an embedded Arrow schema, a reader takes each field’s metadata from it rather than from the Parquet annotation. A FILE-annotated group that the embedded schema describes as a plain struct is then read without this extension type. To get the extension type in that case, read with ArrowReaderOptions::with_skip_arrow_metadata set to true.

The extension name is arrow.parquet.file, which is the intended name for a canonical Arrow extension type; it is not yet standardized.

Trait Implementations§

Source§

impl Clone for FileType

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FileType

Source§

impl Debug for FileType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FileType

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for FileType

Source§

impl ExtensionType for FileType

Source§

const NAME: &'static str = "arrow.parquet.file"

The name identifying this extension type. Read more
Source§

type Metadata = &'static str

The metadata type of this extension type. Read more
Source§

fn metadata(&self) -> &Self::Metadata

Returns a reference to the metadata of this extension type, or &() if if this extension type defines no metadata (Self::Metadata=()).
Source§

fn serialize_metadata(&self) -> Option<String>

Returns the serialized representation of the metadata of this extension type, or None if this extension type defines no metadata (Self::Metadata=()). Read more
Source§

fn deserialize_metadata( metadata: Option<&str>, ) -> Result<Self::Metadata, ArrowError>

Deserialize the metadata of this extension type from the serialized representation of the metadata. An extension type that defines no metadata should expect None for the serialized metadata and return Ok(()). Read more
Source§

fn supports_data_type(&self, data_type: &DataType) -> Result<(), ArrowError>

Returns Ok(()) iff the given data type is supported by this extension type.
Source§

fn try_new( data_type: &DataType, _metadata: Self::Metadata, ) -> Result<Self, ArrowError>

Construct this extension type for a field with the given data type and metadata. Read more
Source§

fn validate( data_type: &DataType, _metadata: Self::Metadata, ) -> Result<(), ArrowError>

Validate this extension type for a field with the given data type and metadata. Read more
§

fn try_new_from_field_metadata( data_type: &DataType, metadata: &Metadata, ) -> Result<Self, ArrowError>

Construct this extension type from field metadata and data type. Read more
Source§

impl PartialEq for FileType

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FileType

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Ungil for T
where T: Send,