use std::sync::Arc;
use polars_core::schema::SchemaRef;
use polars_utils::python_function::PythonFunction;
#[cfg(feature = "ir_serde")]
use serde::{Deserialize, Serialize};
use crate::dsl::python_dsl::PythonScanSource;
use crate::plans::{ExprIR, PlSmallStr};
#[derive(Clone, PartialEq, Eq, Debug, Default)]
#[cfg_attr(feature = "ir_serde", derive(Serialize, Deserialize))]
pub struct PythonOptions {
pub scan_fn: Option<PythonFunction>,
pub schema: SchemaRef,
pub output_schema: Option<SchemaRef>,
pub with_columns: Option<Arc<[PlSmallStr]>>,
pub python_source: PythonScanSource,
pub n_rows: Option<usize>,
pub predicate: PythonPredicate,
pub validate_schema: bool,
pub is_pure: bool,
}
#[derive(Clone, PartialEq, Eq, Debug, Default)]
#[cfg_attr(feature = "ir_serde", derive(Serialize, Deserialize))]
pub enum PythonPredicate {
PyArrow {
predicate: String,
has_residual: bool,
},
Polars(ExprIR),
#[default]
None,
}