[DISCUSS] keeping `LogicalPlan::transform_with_subqueries` et al
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### 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`](https://docs.rs/datafusion/latest/datafusion/common/tree_node/trait.TreeNode.html#method.transform_down_mut))

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: https://github.com/apache/arrow-datafusion/pull/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: https://github.com/apache/arrow-datafusion/pull/10010
Contributor guide
Research direction
Start in datafusion/expr/src/logical_plan/plan.rs, around the transform_with_subqueries and transform_down_mut_with_subqueries implementations, and read the linked PR context about documenting them. Search the repository for uses of these functions and determine the required cleanup. Done means the functions and their references are removed without breaking the logical-plan API or its tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100