Skip to content

Support alter table ... materialize statistics all#87197

Merged
hanfei1991 merged 2 commits intoClickHouse:masterfrom
hanfei1991:hanfei/refine-materialize-stats
Sep 17, 2025
Merged

Support alter table ... materialize statistics all#87197
hanfei1991 merged 2 commits intoClickHouse:masterfrom
hanfei1991:hanfei/refine-materialize-stats

Conversation

@hanfei1991
Copy link
Copy Markdown
Member

@hanfei1991 hanfei1991 commented Sep 16, 2025

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Support alter table ... materialize statistics all will materialize all the statistics of a table

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Sep 16, 2025

Workflow [PR], commit [a377baa]

Summary:

job_name test_name status info comment
Integration tests (amd_binary, 1/5) failure
test_disks_app_interactive/test.py::test_disks_app_interactive_test_move_and_write FAIL
test_disks_app_interactive/test.py::test_disks_app_interactive_list_directories_default FAIL

@alesapin alesapin self-assigned this Sep 16, 2025
@clickhouse-gh clickhouse-gh bot added the pr-improvement Pull request with some product improvements label Sep 16, 2025
@hanfei1991
Copy link
Copy Markdown
Member Author

flaky test #87183

@hanfei1991 hanfei1991 added this pull request to the merge queue Sep 17, 2025
Merged via the queue into ClickHouse:master with commit 9dba3c1 Sep 17, 2025
121 of 123 checks passed
@hanfei1991 hanfei1991 deleted the hanfei/refine-materialize-stats branch September 17, 2025 11:42
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 17, 2025
Comment on lines +436 to 449
if (!ParserKeyword(Keyword::ALL).ignore(pos, expected))
{
if (!parser_partition.parse(pos, command_partition, expected))
if (s_if_exists.ignore(pos, expected))
command->if_exists = true;

if (!parser_stat_decl_without_types.parse(pos, command_statistics_decl, expected))
return false;

if (s_in_partition.ignore(pos, expected))
{
if (!parser_partition.parse(pos, command_partition, expected))
return false;
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to allow MATERIALIZE STATISTICS ALL IN PARTITION ... Now, it's not possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants