polars_plan::plans

Trait AnonymousScan

Source
pub trait AnonymousScan: Send + Sync {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn scan(&self, scan_opts: AnonymousScanArgs) -> PolarsResult<DataFrame>;

    // Provided methods
    fn next_batch(
        &self,
        scan_opts: AnonymousScanArgs,
    ) -> PolarsResult<Option<DataFrame>> { ... }
    fn schema(
        &self,
        _infer_schema_length: Option<usize>,
    ) -> PolarsResult<SchemaRef> { ... }
    fn allows_predicate_pushdown(&self) -> bool { ... }
    fn allows_projection_pushdown(&self) -> bool { ... }
    fn allows_slice_pushdown(&self) -> bool { ... }
}

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Source

fn scan(&self, scan_opts: AnonymousScanArgs) -> PolarsResult<DataFrame>

Creates a DataFrame from the supplied function & scan options.

Provided Methods§

Source

fn next_batch( &self, scan_opts: AnonymousScanArgs, ) -> PolarsResult<Option<DataFrame>>

Produce the next batch Polars can consume. Implement this method to get proper streaming support.

Source

fn schema(&self, _infer_schema_length: Option<usize>) -> PolarsResult<SchemaRef>

function to supply the schema. Allows for an optional infer schema argument for data sources with dynamic schemas

Source

fn allows_predicate_pushdown(&self) -> bool

Specify if the scan provider should allow predicate pushdowns.

Defaults to false

Source

fn allows_projection_pushdown(&self) -> bool

Specify if the scan provider should allow projection pushdowns.

Defaults to false

Source

fn allows_slice_pushdown(&self) -> bool

Specify if the scan provider should allow slice pushdowns.

Defaults to false

Trait Implementations§

Source§

impl Debug for dyn AnonymousScan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§