EeshanBembi commented on PR #16905: URL: https://github.com/apache/datafusion/pull/16905#issuecomment-3121116387
> `EnforceSorting` rule already handles the conversion to PartialSort, so there shouldn't be any additional work during logical to physical mapping. If you remove the following check in the `replace_with_partial_sort()` function: > > ```rust > if !child.boundedness().is_unbounded() { > return Ok(plan); > } > ``` > > you'll get the same behavior, but in a cleaner and safer way. You were absolutely right! Removed the overly restrictive boundedness check in `replace_with_partial_sort()`. Much simpler solution that enables the optimization for bounded inputs. Thanks! -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org