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


##########
datafusion/optimizer/src/eliminate_limit.rs:
##########
@@ -77,8 +83,9 @@ 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.
-                    #[expect(clippy::used_underscore_binding)]
-                    return self.rewrite(Arc::unwrap_or_clone(limit.input), 
_config);
+                    let mut res = 
Self::rewrite_inner(Arc::unwrap_or_clone(limit.input))?;

Review Comment:
   the idea here is to apply the limit pushdown on the inner as well here?



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