Describe the bug
In the push_down_filter optimisation rule, we currently don't check if the child of a filter node has fetch limits. This is semantically equivalent to pushing a filter past a limit node, which is wrong. The same issue exists in the gather_filters_for_pushdown implementation for SortExec.
To Reproduce
I added unit tests in the fix PR which reproduce this behaviour.
Expected behavior
This should never happen, pushing a filter past for example a sort with a fetch limit causes incorrect behaviour.
Additional context
Fix here: #21057