1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use polars_core::prelude::*;
use pyo3::PyObject;

use crate::prelude::*;

impl LazyFrame {
    pub fn scan_from_python_function(schema: Schema, scan_fn: PyObject, pyarrow: bool) -> Self {
        DslPlan::PythonScan {
            options: PythonOptions {
                scan_fn: Some(scan_fn.into()),
                schema: Arc::new(schema),
                pyarrow,
                ..Default::default()
            },
        }
        .into()
    }
}