You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let schema = Schema::from_iter([Field::new("fruits",DataType::Categorical(None))]);
let expr = col("fruits").eq(lit("somestr"));
let out = optimize_expr(expr.clone(), schema.clone(),&mut rules);
// we test that the fruits column is not casted to utf8 for the comparison
assert_eq!(out, expr);
let expr = col("fruits") + (lit("somestr"));
let out = optimize_expr(expr, schema,&mut rules);
let expected = col("fruits").cast(DataType::Utf8) + lit("somestr");
assert_eq!(out, expected);
}
}
However, the test does not compile. It is outdated and hasn't been run in a while. Still, we want to test this functionality. So the test should be rewritten for the latest syntax.
The text was updated successfully, but these errors were encountered:
There's a Rust test for the logical plan optimizer for categorical columns. It should do the following:
See code here:
polars/polars/polars-lazy/polars-plan/src/logical_plan/optimizer/type_coercion/mod.rs
Lines 518 to 541 in a1d5a22
However, the test does not compile. It is outdated and hasn't been run in a while. Still, we want to test this functionality. So the test should be rewritten for the latest syntax.
The text was updated successfully, but these errors were encountered: