Skip to main content

expr_string_to_polars

Function expr_string_to_polars 

Source
pub fn expr_string_to_polars(
    expr_str: &str,
    session: &SparkSession,
    df: &DataFrame,
) -> Result<Expr, PolarsError>
Expand description

Parse a single SQL expression string and convert to Polars Expr using the given DataFrame for column resolution. Used by selectExpr/expr() for PySpark parity. Parses “SELECT expr FROM __t” and returns the first select item’s Expr.