Kristofferjoha commented on code in PR #26719:
URL: https://github.com/apache/datafusion/pull/26719#discussion_r4444696002


##########
datafusion/physical-optimizer/src/ensure_requirements/enforce_sorting/replace_with_order_preserving_variants.rs:
##########
@@ -97,6 +98,7 @@ pub fn plan_with_order_preserving_variants(
         sort_input.data = false;
         return Ok(sort_input);
     }
+    let child_fetch = fetch.filter(|_| 
sort_input.plan.supports_limit_pushdown());

Review Comment:
   Thanks for the review as always. Added your suggestions.
   
   @galaxytemple could we use can_push_fetch_through here to stop fetch 
propagation at limit nodes, and let LimitPushdown handle skip + fetch? With 
this approach, both the reported OFFSET regression and the OFFSET-only case 
pass, and the merge retains fetch=3 in the new regression. It should cover 
#27006 but let me know what you think.



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