masonh22 commented on code in PR #25577:
URL: https://github.com/apache/datafusion/pull/25577#discussion_r4071760338


##########
datafusion/optimizer/src/eliminate_limit.rs:
##########
@@ -78,7 +78,10 @@ impl OptimizerRule for EliminateLimit {
                     // 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.
                     #[expect(clippy::used_underscore_binding)]
-                    return self.rewrite(Arc::unwrap_or_clone(limit.input), 
_config);

Review Comment:
   I actually kind of like it like this.  It's only being used for the 
recursive call, so in a way it is unused.
   
   Although maybe the better way to do this is to make a `rewrite_inner()` 
function that doesn't have the config argument.  I will try that out



-- 
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