pub struct RootDataType { /* private fields */ }
Expand description
Represents the root data type of the ORC file. Contains multiple named child types which map to the columns available. Allows projecting only specific columns from the base schema.
This is essentially a Struct type, but with special handling such as for projection and transforming into an Arrow schema.
Note that the ORC spec states the root type does not necessarily have to be a Struct. Currently we only support having a Struct as the root data type.
Implementations§
Source§impl RootDataType
impl RootDataType
Sourcepub fn column_index(&self) -> usize
pub fn column_index(&self) -> usize
Root column index is always 0.
Sourcepub fn children(&self) -> &[NamedColumn]
pub fn children(&self) -> &[NamedColumn]
Base columns of the file.
Sourcepub fn create_arrow_schema(
&self,
user_metadata: &HashMap<String, String>,
) -> Schema
pub fn create_arrow_schema( &self, user_metadata: &HashMap<String, String>, ) -> Schema
Convert into an Arrow schema.
Sourcepub fn project(&self, mask: &ProjectionMask) -> Self
pub fn project(&self, mask: &ProjectionMask) -> Self
Create new root data type based on mask of columns to project.
Trait Implementations§
Source§impl Clone for RootDataType
impl Clone for RootDataType
Source§fn clone(&self) -> RootDataType
fn clone(&self) -> RootDataType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RootDataType
impl Debug for RootDataType
Auto Trait Implementations§
impl Freeze for RootDataType
impl RefUnwindSafe for RootDataType
impl Send for RootDataType
impl Sync for RootDataType
impl Unpin for RootDataType
impl UnwindSafe for RootDataType
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
Mutably borrows from an owned value. Read more