|When a WITH clause (common table expression, or CTE) was used inside a subquery, and the WITH clause definition referenced the parent query, and was correlated, the query engine did not properly detect the correlation. This produced an incorrect result from the WITH clause evaluation because the result was not cached correctly.
|Correlations inside WITH clause definitions are now properly detected.
Similar LET clause works as expected:
Similar query with subquery as the binding expression of WITH clause:
|For Gerrit Dashboard: MB-57279
|MB-57279 Detect and mark CTE variable as correlated