Skip to content

Add a way to create a new FilterExec directly with a projection #19608

@nuno-faria

Description

@nuno-faria

Is your feature request related to a problem or challenge?

To create a FilterExec with a projection, we need to call try_new and then with_projection. The problem is that compute_properties is executed two times unnecessarily. Since this is relatively expensive, it could be avoided with a new function that creates the filter with the projection in one go.

Describe the solution you'd like

Some pub fn try_new_with_projection(predicate: Arc<dyn PhysicalExpr>, input: Arc<dyn ExecutionPlan>, projection: Option<Vec<usize>>) or similar. I would be happy to add this myself, if no one disagrees.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions