Struct polars_plan::logical_plan::FileInfo
source · pub struct FileInfo {
pub schema: SchemaRef,
pub reader_schema: Option<ArrowSchemaRef>,
pub row_estimation: (Option<usize>, usize),
pub hive_parts: Option<Arc<HivePartitions>>,
}
Fields§
§schema: SchemaRef
§reader_schema: Option<ArrowSchemaRef>
Stores the schema used for the reader, as the main schema can contain extra hive columns.
row_estimation: (Option<usize>, usize)
- known size
- estimated size
hive_parts: Option<Arc<HivePartitions>>
Implementations§
source§impl FileInfo
impl FileInfo
sourcepub fn new(
schema: SchemaRef,
reader_schema: Option<ArrowSchemaRef>,
row_estimation: (Option<usize>, usize)
) -> Self
pub fn new( schema: SchemaRef, reader_schema: Option<ArrowSchemaRef>, row_estimation: (Option<usize>, usize) ) -> Self
Constructs a new FileInfo
.
sourcepub fn init_hive_partitions(
&mut self,
path: &Path,
schema: Option<SchemaRef>
) -> PolarsResult<()>
pub fn init_hive_partitions( &mut self, path: &Path, schema: Option<SchemaRef> ) -> PolarsResult<()>
Set the [HivePartitions
] information for this FileInfo
from a path and an
optional schema.
sourcepub fn update_hive_partitions(&mut self, path: &Path) -> PolarsResult<()>
pub fn update_hive_partitions(&mut self, path: &Path) -> PolarsResult<()>
Update the [HivePartitions
] statistics for this FileInfo
.
If the Hive partitions were not yet initialized, this function has no effect.
Trait Implementations§
source§impl<'de> Deserialize<'de> for FileInfo
impl<'de> Deserialize<'de> for FileInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FileInfo
impl !RefUnwindSafe for FileInfo
impl Send for FileInfo
impl Sync for FileInfo
impl Unpin for FileInfo
impl !UnwindSafe for FileInfo
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
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>
Converts
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>
Converts
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