Skip to content

Make RuntimeEnvBuilder rather than RuntimeConfig #12156

Description

@alamb

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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