pub struct Field {
pub type: i32,
pub name: String,
pub id: i32,
pub parent_id: i32,
pub logical_type: String,
pub nullable: bool,
pub encoding: i32,
pub dictionary: Option<Dictionary>,
pub extension_name: String,
pub metadata: HashMap<String, Vec<u8>>,
pub storage_class: String,
pub unenforced_primary_key: bool,
}Expand description
Field metadata for a column.
Fields§
§type: i32§name: StringFully qualified name.
id: i32/ Field Id.
/
/ See the comment in DataFile.fields for how field ids are assigned.
parent_id: i32/ Parent Field ID. If not set, this is a top-level column.
logical_type: StringLogical types, support parameterized Arrow Type.
PARENT types will always have logical type “struct”.
REPEATED types may have logical types:
- “list”
- “large_list”
- “list.struct”
- “large_list.struct” The final two are used if the list values are structs, and therefore the field is both implicitly REPEATED and PARENT.
LEAF types may have logical types:
- “null”
- “bool”
- “int8” / “uint8”
- “int16” / “uint16”
- “int32” / “uint32”
- “int64” / “uint64”
- “halffloat” / “float” / “double”
- “string” / “large_string”
- “binary” / “large_binary”
- “date32:day”
- “date64:ms”
- “decimal:128:{precision}:{scale}” / “decimal:256:{precision}:{scale}”
- “time:{unit}” / “timestamp:{unit}” / “duration:{unit}”, where unit is “s”, “ms”, “us”, “ns”
- “dict:{value_type}:{index_type}:false”
nullable: boolIf this field is nullable.
encoding: i32§dictionary: Option<Dictionary>/ The file offset for storing the dictionary value. / It is only valid if encoding is DICTIONARY. / / The logic type presents the value type of the column, i.e., string value.
extension_name: StringDeprecated: optional extension type name, use metadata field ARROW:extension:name
metadata: HashMap<String, Vec<u8>>optional field metadata (e.g. extension type name/parameters)
storage_class: String/ The storage class of the field / / This determines the rate at which the field is compacted. / / Currently, there are only two storage classes: / / “” - The default storage class. / “blob” - The field is compacted into fewer rows per fragment. / / Fields that have non-default storage classes are stored in different / datasets (e.g. blob fields are stored in the nested “_blobs” dataset)
unenforced_primary_key: boolImplementations§
Source§impl Field
impl Field
Sourcepub fn type(&self) -> Type
pub fn type(&self) -> Type
Returns the enum value of type, or the default if the field is set to an invalid enum value.
Sourcepub fn encoding(&self) -> Encoding
pub fn encoding(&self) -> Encoding
Returns the enum value of encoding, or the default if the field is set to an invalid enum value.
Sourcepub fn set_encoding(&mut self, value: Encoding)
pub fn set_encoding(&mut self, value: Encoding)
Sets encoding to the provided enum value.
Trait Implementations§
Source§impl Message for Field
impl Message for Field
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for Field
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more