You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dr/src/sql.rs

11 lines
336 B

use polars_sql::SQLContext;
use polars_lazy::prelude::LazyFrame;
pub fn execute(ldf: LazyFrame, statement: &String) -> LazyFrame {
let mut context = SQLContext::try_new().expect("Could not create context");
context.register("this", ldf);
context
.execute(statement)
.expect("Could not execute statement")
}