Skip to content

Commit 280997d

Browse files
authored
Minor: remove unused logic for limit pushdown (#15730)
1 parent 91ad9fd commit 280997d

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

datafusion/physical-optimizer/src/limit_pushdown.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -246,16 +246,7 @@ pub fn pushdown_limit_helper(
246246
Ok((Transformed::no(pushdown_plan), global_state))
247247
}
248248
} 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-
}
249+
global_state.satisfied = true;
259250
pushdown_plan = if let Some(plan_with_fetch) = maybe_fetchable {
260251
if global_skip > 0 {
261252
add_global_limit(plan_with_fetch, global_skip, Some(global_fetch))

0 commit comments

Comments
 (0)