Skip to content

Get rid of special TreeNodes #8663

@peter-toth

Description

@peter-toth

Is your feature request related to a problem or challenge?

Currently there are many special TreeNode trees in DataFusion so as to carry additional information needed for tree transformations. These special trees are a bit cumbersome as they need to implement TreeNode functions (apply_children(), map_children()).

Describe the solution you'd like

I'm suggesting to add TreeNode.transform_with_payload(), TreeNode.transform_down_with_payload() and TreeNode.transform_up_with_payload() to propagate down/up additional information during TreeNode transformation.

Please see 4. in #7942 and its POC implementation.

Describe alternatives you've considered

No response

Additional context

No response

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