We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91ad9fd commit 280997dCopy full SHA for 280997d
datafusion/physical-optimizer/src/limit_pushdown.rs
@@ -246,16 +246,7 @@ pub fn pushdown_limit_helper(
246
Ok((Transformed::no(pushdown_plan), global_state))
247
}
248
} else {
249
- // Add fetch or a `LimitExec`:
250
- // If the plan's children have limit and the child's limit < parent's limit, we shouldn't change the global state to true,
251
- // because the children limit will be overridden if the global state is changed.
252
- if !pushdown_plan
253
- .children()
254
- .iter()
255
- .any(|&child| extract_limit(child).is_some())
256
- {
257
- global_state.satisfied = true;
258
- }
+ global_state.satisfied = true;
259
pushdown_plan = if let Some(plan_with_fetch) = maybe_fetchable {
260
if global_skip > 0 {
261
add_global_limit(plan_with_fetch, global_skip, Some(global_fetch))
0 commit comments