Open
Description
Currently, most elements of the SQL DSL are mutable. This is one of those things that occurred organically over time to make the DSL read more cleanly, but which has increasingly looked out of place. It also prevents a number of performance optimisations.
All SQL dialect elements need to be made immutable, allowing us to resolve some unpleasant API side-effects. Once this is done, we can significantly improve caching and performance.
This will have widespread binary compatibility issues, and even text API compatibility in some edge cases.