Skip to content
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

ALTER TABLE ... MATERIALIZE COLUMN #27038

Merged
merged 10 commits into from
Sep 3, 2021

Conversation

excitoon
Copy link
Contributor

@excitoon excitoon commented Jul 31, 2021

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
ALTER TABLE ... MATERIALIZE COLUMN.

Progress on #18187

@robot-clickhouse robot-clickhouse added doc-alert pr-feature Pull request with new product feature labels Jul 31, 2021
@excitoon
Copy link
Contributor Author

It is not that easy to skip rewriting column if there is no value

@excitoon
Copy link
Contributor Author

excitoon commented Aug 1, 2021

I think it is nearly impossible.

@alesapin
Copy link
Member

alesapin commented Aug 2, 2021

I think it is nearly impossible.

But why? Just add one more check to isStorageTouchedByMutations?

@excitoon
Copy link
Contributor Author

excitoon commented Aug 3, 2021

Yeah, totally!

@excitoon
Copy link
Contributor Author

excitoon commented Aug 3, 2021

@filimonov @alesapin We may want to have possibility to re-materialize column, even if it is partially materialized.

What about:

MATERIALIZE COLUMN xxx FORCE

?

@filimonov
Copy link
Contributor

@filimonov @alesapin We may want to have possibility to re-materialize column, even if it is partially materialized.

Yes, I can imagine some scenarios for that.

What about:

MATERIALIZE COLUMN xxx FORCE

?

I'm not the best at naming things, but ok for me :)

From English-grammar POV it should be 'forcibly', but 'force' is simpler. One more option is to create smth like REMATERIALIZE COLUMN xxx.

@excitoon
Copy link
Contributor Author

excitoon commented Aug 3, 2021

Or existing FINAL

@excitoon excitoon marked this pull request as ready for review August 3, 2021 09:09
@alexey-milovidov
Copy link
Member

Need to fix PVS-Studio report.

@excitoon excitoon changed the title ALTER TABLE ... MATERIALIZE COLUMN [draft] ALTER TABLE ... MATERIALIZE COLUMN Aug 12, 2021
@excitoon excitoon marked this pull request as draft August 12, 2021 07:43
@excitoon excitoon changed the title [draft] ALTER TABLE ... MATERIALIZE COLUMN ALTER TABLE ... MATERIALIZE COLUMN Aug 12, 2021
@excitoon
Copy link
Contributor Author

@alesapin Because isStorageByMutation receives list of commands, and another command can invalidate the result (making it true). I'm heading towards separate FINAL functionality to another PR now.

@excitoon
Copy link
Contributor Author

@Mergifyio rebase

@mergify
Copy link
Contributor

mergify bot commented Aug 23, 2021

Command rebase: failure

Pull request can't be updated with latest base branch changes
Mergify needs the author permission to update the base branch of the pull request.
excitoon-favorites needs to authorize modification on its head branch.
err-code: 3182E

@excitoon excitoon marked this pull request as ready for review August 23, 2021 05:43
@excitoon
Copy link
Contributor Author

excitoon commented Aug 30, 2021

@Mergifyio rebase please, there is one build which is broken :(

@mergify
Copy link
Contributor

mergify bot commented Aug 30, 2021

Command rebase: failure

Pull request can't be updated with latest base branch changes
Mergify needs the author permission to update the base branch of the pull request.
excitoon-favorites needs to authorize modification on its head branch.
err-code: A6BA4

@excitoon
Copy link
Contributor Author

@alexey-milovidov @alesapin Can someone of you step in as a reviewer?

@alesapin alesapin self-assigned this Sep 3, 2021
@alesapin
Copy link
Member

alesapin commented Sep 3, 2021

Ok, should work as expected.

@alesapin alesapin merged commit dd7493d into ClickHouse:master Sep 3, 2021
@gyuton
Copy link
Contributor

gyuton commented Sep 8, 2021

Internal documentation ticket: DOCSUP-14538.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature Pull request with new product feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants