v.24.10Backward Incompatible Changes

Allow SETTINGS before FORMAT in UNION queries with nested subqueries

Allow to write SETTINGS before FORMAT in a chain of queries with UNION when subqueries are inside parentheses. This closes #39712. Change the behavior when a query has the SETTINGS clause specified twice in a sequence. The closest SETTINGS clause will have a preference for the corresponding subquery. In the previous versions, the outermost SETTINGS clause could take a preference over the inner one. #68614 (Alexey Milovidov).