New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent incompatible ALTER of projection columns #56948
Conversation
This is an automated comment for commit a53e604 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
Thanks for the PR, you are very fast. I would add a test for measurements as well https://fiddle.clickhouse.com/14015844-26a7-4dcf-864d-6624398bbda6 |
It seems we should recalculate projections instead of preventing it. Because there are use cases that rely on
which will adapt to metadata changes. For now let's keep the original DROP column behavior. Coupling projection recalculation with other metadata ALTER is non-trivial. |
We should also allow compatible metadata ALTERs such as String -> LowCardinality(String). |
Known flaky test:
Known flaky test:
Same as above. #56866 |
Tests:
|
…7d9b889b14e167398946042b4035c Cherry pick #56948 to 23.8: Prevent incompatible ALTER of projection columns
…7d9b889b14e167398946042b4035c Cherry pick #56948 to 23.9: Prevent incompatible ALTER of projection columns
…17d9b889b14e167398946042b4035c Cherry pick #56948 to 23.10: Prevent incompatible ALTER of projection columns
…7d9b889b14e167398946042b4035c Cherry pick #56948 to 23.3: Prevent incompatible ALTER of projection columns
Backport #56948 to 23.3: Prevent incompatible ALTER of projection columns
Backport #56948 to 23.10: Prevent incompatible ALTER of projection columns
Backport #56948 to 23.9: Prevent incompatible ALTER of projection columns
Backport #56948 to 23.8: Prevent incompatible ALTER of projection columns
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Now ALTER columns which are incompatible with columns used in some projections will be forbidden. Previously it could result in incorrect data. This fixes #56932. This PR also allows RENAME of index columns, and improves the exception message by providing clear information on the affected indices or projections causing the prevention.