rxdrccq commented on code in PR #25784:
URL: https://github.com/apache/datafusion/pull/25784#discussion_r4299375627


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -1175,10 +1175,14 @@ 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.
+                // Memory accounting inside Expr does not affect hashing or 
equality.
+                #[allow(clippy::allow_attributes, clippy::mutable_key_type)]

Review Comment:
   These were added for local `cargo clippy --all-targets --all-features -- -D 
warnings` validation, rather than for the encoding change itself.
   
   I rechecked with Rust 1.99.0 by temporarily removing the three annotations 
(restoring this file to the PR's base version). That produces three 
`clippy::mutable_key_type` errors at `extract_partition_keys`, 
`potential_partition_keys`, and `reads_only_partition_keys`.
   
   `--all-features` enables `datafusion-execution/arrow_buffer_pool`, which 
enables `arrow-buffer/pool`. Clippy follows `Expr` → `ScalarValue` → Arrow 
buffers → `TrackedReservation` → `Mutex` and flags the existing 
`HashSet<&Expr>` uses. The mutable state is memory accounting; it does not 
participate in expression equality or hashing.
   
   CI's Clippy script uses `--features avro,integration-tests,extended_tests`, 
which does not enable that pool feature. That is also why these use `allow` 
instead of `expect`: the lint is feature-dependent, so an unconditional 
expectation would be unfulfilled in the CI configuration. The additional 
`allow_attributes` allowance avoids the workspace lint against `allow` itself.
   
   So these are a separate all-features lint workaround, with no change to 
optimizer behavior; they are not required by Parquet encoding validation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to