Skip to content

Add the possibility to work with plan clones directly in inline_table_scan #12120

@askalt

Description

@askalt

Is your feature request related to a problem or challenge?

I use the implementation of several TableProviders that allow for concurrent modification of the logical plan they store. A bit of context: this is necessary for implementing mutable views. Several views depend on view A and have TableProvider(A) in their logical plan. Then, when view A is modified, the logical plan for it is updated via some synchronization primitive, so all dependent views see the updated plan.

I would like the plans for the views to be inlined during the optimization phase in my implementation. However, the current TableProvider API forces me to return a shared reference to the internal logical plan for inlining, even though a copy would suffice.

I propose adding a get_logical_plan_cloned(...) method to the TableProvider trait, which would be used by passes that don't require a shared reference to the internal logical plan.

Describe the solution you'd like

No response

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