Make RuntimeEnvBuilder rather than RuntimeConfig#12157
Merged
alamb merged 14 commits intoapache:mainfrom Aug 28, 2024
Merged
Conversation
Signed-off-by: Devan <devandbenz@gmail.com>
Signed-off-by: Devan <devandbenz@gmail.com>
yjshen
reviewed
Aug 25, 2024
Signed-off-by: Devan <devandbenz@gmail.com>
Signed-off-by: Devan <devandbenz@gmail.com>
Signed-off-by: Devan <devandbenz@gmail.com>
Signed-off-by: Devan <devandbenz@gmail.com>
Signed-off-by: Devan <devandbenz@gmail.com>
alamb
approved these changes
Aug 26, 2024
Contributor
alamb
left a comment
There was a problem hiding this comment.
Looks good to me -- thank you @devanbenz and @yjshen
I think all we need to do is to merge up from main and this will be ready to merge
I think adding RuntimeEnvBuilder::build_arc() would make the code even nicer, but it can totally be done as a follow on PR (or never)
| /// // configure a memory limit of 1GB with 20% slop | ||
| /// let runtime_env = RuntimeEnv::new( | ||
| /// RuntimeConfig::new() | ||
| /// let runtime_env = RuntimeEnvBuilder::new() |
| let runtime_config = RuntimeConfig::new() | ||
| .with_memory_pool(Arc::new(GreedyMemoryPool::new(pool_size))); | ||
| let runtime = Arc::new(RuntimeEnv::new(runtime_config).unwrap()); | ||
| let runtime = Arc::new( |
Contributor
There was a problem hiding this comment.
as a follow on maybe we could even make a build_arc() type method to make this even nicer looking
Following the model of https://docs.rs/datafusion/latest/datafusion/datasource/physical_plan/parquet/struct.ParquetExecBuilder.html#method.build_arc
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Contributor
|
Thanks again @devanbenz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Devan devandbenz@gmail.com## Which issue does this PR close?
Closes #12156
Rationale for this change
Please see the issue #12156 for rationale.
What changes are included in this PR?
Renames
RuntimeConfigstruct toRuntimeEnvBuilderto state more clearly its usage. Includes a type alias for backwards compatibility to ensure non-breaking changes.Are these changes tested?
Are there any user-facing changes?