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 it clearer that RuntimeEnv::new() is fallable #12554

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

Make it clearer that RuntimeEnv::new() is fallable #12554

alamb opened this issue Sep 20, 2024 · 2 comments · Fixed by #12566
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@alamb
Copy link
Contributor

alamb commented Sep 20, 2024

Is your feature request related to a problem or challenge?

While working on https://github.com/datafusion-contrib/datafusion-dft it was not clear that RuntimeEnv::new() actually returns a Result as the typical rust convention is a function new() is infallable and a function like try_new() is fallable. While this isn't a big deal it was a small usability papercut

Describe the solution you'd like

I would like RuntimeEnv to follow standard rust conventions to make it easier to use

Describe alternatives you've considered

I suggest:

  1. Deprecating RuntimeEnv::new()
  2. Add a new function RuntimeEnv::try_new() that does the same thing
  3. Update all the datafusion code to use try_new instead

Additional context

No response

@alamb alamb added the enhancement New feature or request label Sep 20, 2024
@alamb alamb added the good first issue Good for newcomers label Sep 20, 2024
@alamb
Copy link
Contributor Author

alamb commented Sep 20, 2024

I think this is a good first issue as it is clearly described and straightforward to implement. It would be a good introduction to DataFusion I think

@OussamaSaoudi
Copy link
Contributor

take

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

Successfully merging a pull request may close this issue.

2 participants