milenkovicm commented on PR #18739: URL: https://github.com/apache/datafusion/pull/18739#issuecomment-3599327640
> > * Why have we introduced `OptimizerContext` when it only wraps `SessionConfig`, what else do we expect to have in `OptimizerContext`? > > A pattern we've seen time and time again in this project is to assume that we won't want to make any changes in the future and then realizing we do. Having a specialized struct lets us do that with very little overhead. > Right, we might need it eventually so we’ve decided to make it as wide as possible to allow for a change that might never be necessary. > Nothing really. Before there was no `Extensions`, you got/set them against `SessionConfig` directly and it stored a `HashMap`. I created a wrapper around that `HashMap` to have a named thing to hand out a reference for and establish a controlled API surface area. Ok, so we added new struct to the public API which wasn’t really necessary. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
