From e7628f7cc731edccbdce760af68508aee0a6168b Mon Sep 17 00:00:00 2001 From: Vova Kot Date: Sun, 11 Oct 2026 13:11:01 +0000 Subject: [PATCH] chore: scope mutable-key lint exceptions for window expressions --- datafusion/optimizer/src/push_down_filter.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datafusion/optimizer/src/push_down_filter.rs b/datafusion/optimizer/src/push_down_filter.rs index efd5a61e4ed9..d9c6feb4cfb0 100644 --- a/datafusion/optimizer/src/push_down_filter.rs +++ b/datafusion/optimizer/src/push_down_filter.rs @@ -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() @@ -1601,6 +1604,7 @@ fn with_filters(predicates: Vec, 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>,