Skip to content

[DISCUSS] keeping LogicalPlan::transform_with_subqueries et al #10011

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

One thing I finally understand while writing this is why @peter-toth added transform_down_mut_with_subqueries and similar functions. It is to mirror what is available on TreeNode (e.g. transform_down_mut)

Screenshot 2024-04-09 at 7 36 34 AM

While these functions have a nice symmetry I think their presence is more confusing than helpful and their use is quite limited (as can be seen by their implementation https://github.com/apache/arrow-datafusion/blob/eb05741e2167dec5df10a10c8435ebedbea6787d/datafusion/expr/src/logical_plan/plan.rs#L1392-L1445)

I clearly was confused as well myself in the past when I tried to remove them: #9997

Describe the solution you'd like

I think we should remove these functions in the name of a cleaner API

Describe alternatives you've considered

We can leave them

Additional context

I only finally realized what was going on while trying to document these functions: #10010

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions