v.20.3Improvement

Fix "Cannot find column" error in MATERIALIZED VIEW after adding new column to internal table

Fix error Cannot find column while inserting into MATERIALIZED VIEW in case if new column was added to view's internal table. #8766 #8788 (vzakaznikov) #8788 #8806 (Nikolai Kochetov) #8803 (Nikolai Kochetov)
Fixes an error where inserting data into a MATERIALIZED VIEW fails with Cannot find column if a new column was added to the view's internal table.

Why it matters

Previously, when a new column was added to the internal table of a MATERIALIZED VIEW, attempts to insert data into the view could lead to a Cannot find column error. This fix resolves that issue by properly handling columns added to the internal structure, ensuring smooth data insertion and preventing disruptions in workflows relying on materialized views.

How to use it

This fix is applied internally in the ClickHouse server. Users encountering the Cannot find column error on inserts to MATERIALIZED VIEW after schema changes should upgrade to the fixed version. No additional configuration or changes to query syntax are required.