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

Make SessionContext::enable_url_table consume self #12551

Closed
Tracked by #12550
alamb opened this issue Sep 20, 2024 · 0 comments · Fixed by #12573
Closed
Tracked by #12550

Make SessionContext::enable_url_table consume self #12551

alamb opened this issue Sep 20, 2024 · 0 comments · Fixed by #12573
Assignees
Labels
enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Sep 20, 2024

Is your feature request related to a problem or challenge?

While working on datafusion-contrib/datafusion-dft#152 and trying to enable the dynamic file catalog, I wrote code like this:

let session_ctx = ...;
session_ctx.enable_url_table();

which compiled fine but did not work

It turns out I needed to do this (use the returned SessionContext)

let session_ctx = ...;
session_ctx.enable_url_table();

It would be nice if the compiler had told me about this

Describe the solution you'd like

I would like to make enable_url_table consume self this making my first bug a compiler error rather than silently ignored

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant