Skip to content

Commit

Permalink
fix(rust): correct AExpr.to_field for bitwise and logical and/or
Browse files Browse the repository at this point in the history
AExpr.to_field would incorrectly state that the bitwise and/or of
integral columns was boolean, and conversely that the logical and/or
was the common supertype. Fix this by matching on the correct operator
names.

- Closes #16359
  • Loading branch information
wence- committed May 21, 2024
1 parent 6289dc3 commit 89c7bf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/polars-plan/src/logical_plan/aexpr/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ impl AExpr {
| Operator::Gt
| Operator::Eq
| Operator::NotEq
| Operator::And
| Operator::LogicalAnd
| Operator::LtEq
| Operator::GtEq
| Operator::NotEqValidity
| Operator::EqValidity
| Operator::Or => {
| Operator::LogicalOr => {
let out_field;
let out_name = {
out_field = arena.get(*left).to_field(schema, ctxt, arena)?;
Expand Down

0 comments on commit 89c7bf2

Please sign in to comment.