You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a builder to SimplifyContext to avoid allocating default values (#21092)
## Which issue does this PR close?
- Closes #.
## Rationale for this change
This is a follow up to #21084, where @blaginin realized that allocating
`ConfigOptions` has this surprising side effect. Reading through how its
used I realized that on mode "real" code paths (and in many tests),
DataFusion ends up allocating the default values of `SimplifyContext`
just to immediately drop them and override them with pre-existing
clone-able data.
## What changes are included in this PR?
Adds a new type `SimplifyContextBuilder` and `SimplifyContext::builder`
## Are these changes tested?
Includes a couple of tests to make sure the builder makes sense, in
addition to many existing tests.
## Are there any user-facing changes?
As noted above, new type and a new function on an existing type.
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
---------
Signed-off-by: Adam Gutglick <adamgsal@gmail.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
0 commit comments