v.23.10Improvement

Fix for OPTIMIZE Failure Due to Inconsistent Projections

Sometimes OPTIMIZE with optimize_throw_if_noop=1 may fail with an error unknown reason while the real cause of it - different projections in different parts. This behavior is fixed. #55130 (Nikita Mikhaylov).
Fixed an issue where OPTIMIZE with optimize_throw_if_noop=1 failed with an unclear unknown reason error due to differing projections in parts.

Why it matters

This fix improves the error reporting and handling of the OPTIMIZE operation when projections differ across data parts, preventing misleading errors and helping users understand the actual cause.

How to use it

Use OPTIMIZE with the setting optimize_throw_if_noop=1 as usual; the operation will no longer fail with an ambiguous error when projections differ between parts.