Skip to content

Make SessionContext::enable_url_table consume self #12551

@alamb

Description

@alamb

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

Metadata

Metadata

Assignees

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