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:
| Field | Arrow type |
|---|---|
uri | Utf8, LargeUtf8, or Utf8View |
offset | Int64 |
size | Int64 |
content_type | Utf8, LargeUtf8, or Utf8View |
checksum | Utf8, LargeUtf8, or Utf8View |
inline | Binary, 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§
impl Copy for FileType
impl Eq for FileType
Source§impl ExtensionType for FileType
impl ExtensionType for FileType
Source§const NAME: &'static str = "arrow.parquet.file"
const NAME: &'static str = "arrow.parquet.file"
Source§fn metadata(&self) -> &Self::Metadata
fn metadata(&self) -> &Self::Metadata
&() if
if this extension type defines no metadata (Self::Metadata=()).Source§fn serialize_metadata(&self) -> Option<String>
fn serialize_metadata(&self) -> Option<String>
None if this extension type defines no metadata
(Self::Metadata=()). Read moreSource§fn deserialize_metadata(
metadata: Option<&str>,
) -> Result<Self::Metadata, ArrowError>
fn deserialize_metadata( metadata: Option<&str>, ) -> Result<Self::Metadata, ArrowError>
None for the serialized metadata and return
Ok(()). Read moreSource§fn supports_data_type(&self, data_type: &DataType) -> Result<(), ArrowError>
fn supports_data_type(&self, data_type: &DataType) -> Result<(), ArrowError>
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>
fn try_new( data_type: &DataType, _metadata: Self::Metadata, ) -> Result<Self, ArrowError>
Source§fn validate(
data_type: &DataType,
_metadata: Self::Metadata,
) -> Result<(), ArrowError>
fn validate( data_type: &DataType, _metadata: Self::Metadata, ) -> Result<(), ArrowError>
§fn try_new_from_field_metadata(
data_type: &DataType,
metadata: &Metadata,
) -> Result<Self, ArrowError>
fn try_new_from_field_metadata( data_type: &DataType, metadata: &Metadata, ) -> Result<Self, ArrowError>
impl StructuralPartialEq for FileType
Auto Trait Implementations§
impl Forget for FileType
impl Freeze for FileType
impl RefUnwindSafe for FileType
impl Send for FileType
impl Sync for FileType
impl Unpin for FileType
impl UnsafeUnpin for FileType
impl UnwindSafe for FileType
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.