adriangb commented on PR #18739:
URL: https://github.com/apache/datafusion/pull/18739#issuecomment-3599256298

   > * 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.
   
   > * If changing interface could we just change method parameter and use 
`SessionConfig` instead of `ConfigOptions`, instead of adding new method and 
deprecating? Would it be cleaner approach?
   
   We considered doing this but decided to go this route instead because of (1) 
the future extensibility mentioned above and (2) changing the signature of the 
current method would be an immediate breaking change that makes upgrades 
difficult (there is no deprecation period), so you end up wanting to add a new 
method, if you're adding a new method you might as well make it extensible in 
the future.
   
   > Whats the difference between current and previous Extensions ?
   
   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.
   
   


-- 
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]

Reply via email to