Skip to content

Add projection to FilterExec to avoid unecessary output creation #5436

@Dandandan

Description

@Dandandan

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently FilterExec filters/outputs all columns present in the filter expression. This does unnecessary work, as we might not need certain columns later.

Describe the solution you'd like
Add projection to Filter/FilterExec and use it before passing the RecordBatch to the arrow kernel.
This saves a bit of computation, especially when there is only one column in the projection (fast case).

Also update the schema based on the projection.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformanceMake DataFusion faster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions