Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions datafusion/optimizer/src/push_down_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1135,10 +1135,13 @@ impl OptimizerRule for PushDownFilter {
// multiple window functions, each with potentially different partition keys.
// Therefore, we need to ensure that any potential partition key returned is used in
// ALL window functions. Otherwise, filters cannot be pushed by through that column.
#[allow(clippy::allow_attributes, clippy::mutable_key_type)] // Expr's memory reservations do not affect equality or hashing
fn extract_partition_keys(func: &WindowFunction) -> HashSet<&Expr> {
func.params.partition_by.iter().collect()
}

#[allow(clippy::allow_attributes, clippy::mutable_key_type)]
// Expr's memory reservations do not affect equality or hashing
let potential_partition_keys = window
.window_expr
.iter()
Expand Down Expand Up @@ -1601,6 +1604,7 @@ fn with_filters(predicates: Vec<Expr>, plan: LogicalPlan) -> LogicalPlan {
///
/// A predicate containing a subquery is never pushed: what the subquery reads is
/// not visible from the expression tree.
#[allow(clippy::allow_attributes, clippy::mutable_key_type)] // Expr's memory reservations do not affect equality or hashing
fn reads_only_partition_keys(
expr: &Expr,
partition_keys: &HashSet<&Expr>,
Expand Down
Loading