Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andygrove opened this issue Sep 20, 2022 · 0 comments · Fixed by #3548
Closed

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

andygrove opened this issue Sep 20, 2022 · 0 comments · Fixed by #3548
Assignees
Labels
bug Something isn't working optimizer Optimizer rules

Comments

@andygrove
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working optimizer Optimizer rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant