Skip to content

Commit

Permalink
fix: InplaceAggregate for boolean columns (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
waralexrom authored Dec 1, 2023
1 parent 5c5924c commit 2dfe4e1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion datafusion/src/physical_plan/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use async_trait::async_trait;

use crate::logical_plan::Operator;
use crate::physical_plan::expressions::{
BinaryExpr, CastExpr, Column, Literal, TryCastExpr,
BinaryExpr, CastExpr, Column, Literal, NotExpr, TryCastExpr,
};
use futures::stream::{Stream, StreamExt};

Expand Down Expand Up @@ -198,6 +198,13 @@ fn extract_single_value_columns_impl<'a>(
}
_ => {}
}
} else if predicate.is::<Column>() {
out.push(predicate.downcast_ref::<Column>().unwrap());
} else if predicate.is::<NotExpr>() {
let inner = predicate.downcast_ref::<NotExpr>().unwrap().arg();
if inner.as_any().is::<Column>() {
out.push(inner.as_any().downcast_ref::<Column>().unwrap());
}
}
}

Expand Down

0 comments on commit 2dfe4e1

Please sign in to comment.