alamb commented on code in PR #15189:
URL: https://github.com/apache/datafusion/pull/15189#discussion_r1992221050


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -799,6 +799,7 @@ impl OptimizerRule for PushDownFilter {
                     new_predicate,
                     child_filter.input,
                 )?);
+                #[allow(clippy::used_underscore_binding)]

Review Comment:
   likewise here, I suggest we rename the variable rather than allow the lint



##########
datafusion/physical-plan/src/joins/nested_loop_join.rs:
##########
@@ -75,21 +75,22 @@ struct JoinLeftData {
     probe_threads_counter: AtomicUsize,
     /// Memory reservation for tracking batch and bitmap
     /// Cleared on `JoinLeftData` drop
-    _reservation: MemoryReservation,
+    #[allow(dead_code)]
+    reservation: MemoryReservation,

Review Comment:
   ```suggestion
       /// reservation is cleared on Drop 
       #[expect(dead_code)]    
       reservation: MemoryReservation,
   ```
   
   Also if you use `expect(` rather than `allow` clippy will error if the code 
ever changes (and we can remove the unecessary annotation). Allow will still run



##########
datafusion/physical-optimizer/src/aggregate_statistics.rs:
##########
@@ -45,7 +45,7 @@ impl PhysicalOptimizerRule for AggregateStatistics {
     fn optimize(
         &self,
         plan: Arc<dyn ExecutionPlan>,
-        _config: &ConfigOptions,
+        config: &ConfigOptions,

Review Comment:
   👍 



##########
datafusion/optimizer/src/eliminate_limit.rs:
##########
@@ -77,6 +77,7 @@ impl OptimizerRule for EliminateLimit {
                 } else if matches!(limit.get_skip_type()?, 
SkipType::Literal(0)) {
                     // If fetch is `None` and skip is 0, then Limit takes no 
effect and
                     // we can remove it. Its input also can be Limit, so we 
should apply again.
+                    #[allow(clippy::used_underscore_binding)]

Review Comment:
   I think instead oif allowing this, we should change the name of the argument 
to `config` as it is actually used



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to