Skip to content
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

refactor: remove unneed mut for session context #11864

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

sunng87
Copy link
Contributor

@sunng87 sunng87 commented Aug 7, 2024

Rationale for this change

Two years ago we require mutable reference of SessionContext for any operations like exec_/register_. But recently SessionContext owns a RwLock internally so mutable reference is no longer needed.

What changes are included in this PR?

This change remove all mutable marker I can find in tests, docs and also one API of SessionContext

Are these changes tested?

When it compiles, it's correct.

Are there any user-facing changes?

There is an API breaking change for register_catalog_list in SessionContext. The mutable requirement is removed.

@github-actions github-actions bot added documentation Improvements or additions to documentation core Core DataFusion crate labels Aug 7, 2024
Copy link
Member

@lewiszlw lewiszlw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you @sunng87

@sunng87 sunng87 force-pushed the doc/remove-mut-session-context branch from 188f378 to 397b048 Compare August 7, 2024 10:12
Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sunng87

@lewiszlw lewiszlw merged commit d0a1d30 into apache:main Aug 8, 2024
25 checks passed
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants