Skip to content

Filter pushdown past children with fetch limits causes correctness bug #21063

Closed

Description

@shivbhatia10

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

Activity

  1. added theissue type on Mar 19, 2026
  2. shivbhatia10 commented on Mar 19, 2026

    @shivbhatia10
    ContributorAuthor

    take

  3. shivbhatia10 commented on Mar 19, 2026

    @shivbhatia10
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions