v.25.11Improvement

Make query plan optimizations visible

Make query plan optimizations visible to the correlated subquery input subplan by postponing it's materialization. Part of #79890. #85455 (Dmitry Novik).
Enhances query planner to postpone the materialization of correlated subquery input subplans, making query plan optimizations visible to them.

Why it matters

This feature addresses the limitation where optimizations could not be applied effectively to the input subplans of correlated subqueries due to premature materialization. By postponing materialization, it allows the query planner to apply optimizations, improving query execution efficiency and performance.

How to use it

This optimization is applied automatically within the ClickHouse query planner when running queries with correlated subqueries. No explicit user action or configuration is required.