Skip to content

Commit

Permalink
add some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite committed Jan 9, 2025
1 parent f1765ee commit 7d85e6a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/polars-mem-engine/src/executors/multi_file_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ use crate::executors::JsonExec;
use crate::executors::ParquetExec;
use crate::prelude::*;

/// An [`Executor`] that scans over some IO.
pub trait ScanExec {
/// Read the source.
fn read(
&mut self,
with_columns: Option<Arc<[PlSmallStr]>>,
Expand All @@ -29,7 +31,13 @@ pub trait ScanExec {
row_index: Option<RowIndex>,
) -> PolarsResult<DataFrame>;

/// Get the full schema for the source behind this [`Executor`].
///
/// Note that this might be called several times so attempts should be made to cache the result.
fn schema(&mut self) -> PolarsResult<&SchemaRef>;
/// Get the number of rows for the source behind this [`Executor`].
///
/// Note that this might be called several times so attempts should be made to cache the result.
fn num_unfiltered_rows(&mut self) -> PolarsResult<IdxSize>;
}

Expand Down

0 comments on commit 7d85e6a

Please sign in to comment.