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 RuntimeEnvBuilder rather than RuntimeConfig #12156

Closed
alamb opened this issue Aug 25, 2024 · 1 comment · Fixed by #12157
Closed

Make RuntimeEnvBuilder rather than RuntimeConfig #12156

alamb opened this issue Aug 25, 2024 · 1 comment · Fixed by #12157
Assignees
Labels
enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Aug 25, 2024

Is your feature request related to a problem or challenge?

@theirix added a very nice API in #12151 to simplify RuntimeEnv construction.

However, @comphead pointed out https://github.com/apache/datafusion/pull/12151/files#r1730134993 the names are now somewhat strange that you get a runtime_env when creating a RuntimeConfig object

            let runtime_env = RuntimeConfig::new()
                .with_memory_pool(Arc::new(GreedyMemoryPool::new(pool_size)))
                .build();

Describe the solution you'd like

I think a more standard pattern would be of RuntimeConfig was called RuntimeEnvBuilder

Then the example would look like

            let runtime_env = RuntimeEnvBuilder::new()
                .with_memory_pool(Arc::new(GreedyMemoryPool::new(pool_size)))
                .build();

Describe alternatives you've considered

I suggest:

  1. Rename RuntimeEnvBuilder to RuntimeConfig
  2. Leave a type alias type RuntimeConfig = RuntimeEnvBuilder to ease upgrades (maybe the typedef could be deprecated with a message to use RuntimeEnvBuilder)

Additional context

No response

@devanbenz
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants