v.22.2Experimental Feature

Fix Issues with Default Projection in ClickHouse

Fix various issues when projection is enabled by default. Each issue is described in separate commit. This is for #33678 . This fixes #34273. #34305 (Amos Bird).
Fixes issues related to enabling projections by default in ClickHouse.

Why it matters

This feature addresses multiple bugs and inconsistencies that occur when projections are enabled by default, improving stability and reliability of query execution in such scenarios. It ensures that projections work correctly without requiring manual activation, enhancing user experience and performance.

How to use it

Projections can be enabled by default in the server configuration to gain optimization benefits; with these fixes, users can reliably use projections without encountering prior issues. Refer to the ClickHouse configuration for enabling projections by setting the appropriate flags.