Skip to content

Lower &mut SessionContext to &SessionContext in substrait consumer/producer #7836

@amartins23

Description

@amartins23

Is your feature request related to a problem or challenge?

Currently functions to convert from substrait to DataFusion plans, or to produce a substrait plan from a DataFusion logical plan, require a mutable reference to SessionContext. However, none of the implementations seems to require that. Since state access in the session context does not require a mutable pointer, I don't see the need to take a mutable reference to the session context.

Allowing shared references to SessionContext to be used would simplify consuming code and should not be a breaking as you can pass an &mut reference to a function expecting a shared reference.

Describe the solution you'd like

Change the various conversion functions in the datafusion-substrait crate to receive &SessionContext instead of &mut SessionContext.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions