Skip to content

Allow Dynamic Filters Filters to pass through AggregateExec #18399

@LiaCastaneda

Description

@LiaCastaneda

Is your feature request related to a problem or challenge?

Currently, AggregateExec does not implement gather_filters_for_pushdown, which means
dynamic filters cannot pass through aggregations.

In most cases this is correct behavior - when aggregate functions like SUM(),
COUNT(), AVG() are used, filtering rows before aggregation would produce incorrect
results.

However, there's an important special case: pure grouping operations (DISTINCT
or GROUP BY without aggregate functions). For these operations, it's safe to push
filters through because they only de-duplicate data without computing new values. This blocks significant optimization opportunities for queries with DISTINCT or pure
GROUP BY on the probe side of inner joins i think

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions