Theodus commented on code in PR #24273:
URL: https://github.com/apache/datafusion/pull/24273#discussion_r3777033773
##########
datafusion/physical-optimizer/src/limit_pushdown.rs:
##########
@@ -160,7 +160,7 @@ pub fn pushdown_limit_helper(
);
global_state.skip = skip;
global_state.fetch = fetch;
- global_state.preserve_order = limit_info.preserve_order;
+ global_state.preserve_order |= limit_info.preserve_order;
Review Comment:
Thanks for catching this. You’re right, `preserve_order` could leak past the
`SortExec` into the independent inner limit. Fixed in 7da9015 by clearing it
after the outer fetch is applied. I also added a test for this case.
--
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]