v.22.1Improvement

Disable Optimizations for Window Functions to Prevent Exceptions

Disable some optimizations for window functions that may lead to exceptions. Closes #31535. Closes #31620. #32453 (Kseniia Sumarokova).
Disabled certain optimizations for window functions in ClickHouse that could cause exceptions during query execution.

Why it matters

This feature addresses stability issues by preventing exceptions caused by specific window function optimizations. It improves query reliability and prevents failures when using window functions in analytical queries.

How to use it

This safety improvement is applied internally by default with the update and requires no explicit user action. Users will benefit from enhanced stability of window functions without changing query syntax.