-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lower &mut SessionContext to &SessionContext in substrait consumer/producer #7836
Comments
Hi @amartins23 It seems like the consumer functions such as Require mutable access, but the producers do not (they already take This I think this ticket would require:
This seems straightforward and a good first project so marking it as such Note there may be some subtlety I don't understand that would make this not feasible. |
I'd like to have a try. |
Sorry for the delay in completing this task. Would an example like this be OK? |
No worries -- thank you for doing so! |
Fixed in #7965 |
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
The text was updated successfully, but these errors were encountered: