discord9 commented on code in PR #23800: URL: https://github.com/apache/datafusion/pull/23800#discussion_r3781605972
########## datafusion/physical-optimizer/src/limit_pushdown.rs: ########## Review Comment: > Is copying the global state into _every_ child correct, for an operator with multiple children? e.g., if we have an operator with `n` children and a single output partition, wouldn't this result in copying the fetch limit into `n` different operators, so we'd produce too many rows? The final results is still comes from a single partition output CoalescePartitionsExec/SortPreservingMergeExec so the result will only be like what limit=N needs, as the cloned global state to every child should be like this anyway: ``` pending = None skip = 0 fetch = Some(N) -- just a early stop hint for child ``` -- 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]
