Part of #23740.
StreamingOptions's _opt() and StreamingExecutor's _make_default_factory() are
independently written, near-identical implementations of "explicit value, then env
var(s), then default". An inline block in ConfigOptions.from_polars_engine and
MemoryResourceConfig()'s own construction are two more independent copies of "explicit
value, then build a nested object if enabled, then a fallback", for the memory resource
config specifically. Replace both groups with one shared function each, used everywhere a
field of that shape is declared, regardless of which dataclass declares it.
Part of #23740.
StreamingOptions's_opt()andStreamingExecutor's_make_default_factory()areindependently written, near-identical implementations of "explicit value, then env
var(s), then default". An inline block in
ConfigOptions.from_polars_engineandMemoryResourceConfig()'s own construction are two more independent copies of "explicitvalue, then build a nested object if enabled, then a fallback", for the memory resource
config specifically. Replace both groups with one shared function each, used everywhere a
field of that shape is declared, regardless of which dataclass declares it.