Skip to content

Aggregate filters do not get pushed down to table scan #3546

Description

@andygrove

Describe the bug
Aggregate filters do not get pushed down to table scan. This results in invalid query plans. In this example, the column user_id has not been pushed down to the table scan.

Projection: #SUM(user_table_1.b) FILTER (WHERE #user_id = Int64(2)) AS S1, #SUM(user_table_1.b) AS S2
  Aggregate: groupBy=[[]], aggr=[[SUM(#user_table_1.b) FILTER (WHERE #user_id = Int64(2)), SUM(#user_table_1.b)]]
    TableScan: user_table_1 projection=[b]

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

Activity

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 workingoptimizerOptimizer rules

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions