Antalya-26.3 Frontport of #1659 - Add ALTER TABLE MODIFY SETTING support for Hybrid watermarks#1723
Conversation
Antalya 26.1 - Add ALTER TABLE MODIFY SETTING support for Hybrid watermarks
| const ASTPtr & base_predicate, const std::vector<StorageDistributed::HybridSegment> & segs) | ||
| { | ||
| std::unordered_map<String, String> result; | ||
| std::function<void(const ASTPtr &)> walk = [&](const ASTPtr & node) |
There was a problem hiding this comment.
This function looks very similar to replace_hybrid_params, maybe there is a way to reduce the code duplication?
There was a problem hiding this comment.
I see this function only validates it, which seems to be a copy and paste of replace_hybrid_params without the replace logic. Maybe you can clone the original ast and just call replace? This will also make the maintainance better
There was a problem hiding this comment.
I tried to address it in 9c92e1d by:
- Moving the checks into a separate function
- Moving the iterating routine into a visitor
| const auto & param_name = name_lit->value.safeGet<String>(); | ||
| const auto & type_name = type_lit->value.safeGet<String>(); | ||
|
|
||
| if (!watermark_snapshot) |
There was a problem hiding this comment.
Can't this be checked on line 1234? Right after auto watermark_snapshot = hybrid_watermark_params.get();
There was a problem hiding this comment.
It can, but in this case we won't have a watermark name to put into the exception message
|
|
||
|
|
||
| /// Extract declared hybridParam types from all Hybrid predicate ASTs. | ||
| static std::unordered_map<String, String> collectHybridParamTypes( |
There was a problem hiding this comment.
Does it really extract types? It seems to me it actually builds a map from the hybrid args, not only type names.
There was a problem hiding this comment.
The map stores {name1: type1, ...} so I don't really see the conflict here. I mean, yeah, it does build a map for the hybrid args, but it's only the mapping from the name to the type.
| if (auto * func = node->as<ASTFunction>(); func && func->name == "hybridParam") | ||
| { | ||
| auto * arg_list = func->arguments ? func->arguments->as<ASTExpressionList>() : nullptr; | ||
| if (!arg_list || arg_list->children.size() != 2) | ||
| throw Exception(ErrorCodes::BAD_ARGUMENTS, | ||
| "hybridParam() requires exactly 2 arguments: (name, type)"); | ||
|
|
||
| auto * name_lit = arg_list->children[0]->as<ASTLiteral>(); | ||
| auto * type_lit = arg_list->children[1]->as<ASTLiteral>(); | ||
| if (!name_lit || name_lit->value.getType() != Field::Types::String) | ||
| throw Exception(ErrorCodes::BAD_ARGUMENTS, | ||
| "hybridParam() first argument (name) must be a string literal"); | ||
| if (!type_lit || type_lit->value.getType() != Field::Types::String) | ||
| throw Exception(ErrorCodes::BAD_ARGUMENTS, | ||
| "hybridParam() second argument (type) must be a string literal"); | ||
|
|
||
| const auto & param_name = name_lit->value.safeGet<String>(); | ||
| const auto & type_name = type_lit->value.safeGet<String>(); |
There was a problem hiding this comment.
IMHO we should abstract away these checks. Searching for type_lit->value.getType() != Field::Types::String shows 3 occurrences.
Verification report: Altinity/ClickHouse PR #1723PR: #1723 ConclusionCI red on head, but every failure is either a pre-existing flake or a regression-suite scenario already broken at baseline on
CI on head
|
| Check | Test FAIL | Class |
|---|---|---|
Stateless tests (amd_debug, sequential) |
00157_cache_dictionary |
Pre-existing flake — 106 / 25 PRs / 90d |
Stateless tests (arm_asan, azure, sequential, 2/2) |
03443_shared_storage_snapshots |
Pre-existing flake — 30 / 18 |
Stress test (arm_asan) |
Unknown error (job-level) |
Pre-existing instability — 5 occurrences / 5 PRs / 30d on antalya-26.3 |
Regression workflow (8 failed checks)
| Check | Top failing tests on PR-1723 builds (30d) | Baseline (antalya-26.3, 30d) |
Class |
|---|---|---|---|
Swarms (Release + Aarch64) |
node failure / initiator out of disk space (×8), swarm joins / join clause (×8) |
78% / 49% | Pre-existing broken |
S3Export (partition) (Release + Aarch64) |
sanity / mismatched columns, partition export tight pool lock inside task, no partition by (×8 each) |
50–60% | Pre-existing broken |
S3Export (part) (Release + Aarch64) |
/s3 suite-level fails |
flaky | Pre-existing flaky |
Parquet (Release + Aarch64) |
postgresql/mysql round-trip compression-type variants (×8 each) | ~36% | Pre-existing flaky |
Regression DB on /PRs/1723/ builds (30d): 751 Fail / 23,591 OK ≈ 3.1%. Every top failure matches the all-PR baseline fail rate on antalya-26.3.
Related to PR diff?
PR is the 26.3 frontport of upstream #1659 — ALTER TABLE MODIFY SETTING for Hybrid table watermarks (8 files in Hybrid storage / settings plumbing).
| Failing test | Diff overlap | Related? |
|---|---|---|
00157_cache_dictionary, 03443_shared_storage_snapshots |
none | No |
Stress arm_asan Unknown error |
none — recurring on 5 unrelated PRs on antalya-26.3 |
No |
swarms / *, parquet / *, s3_export_partition / *, s3_export_part / * |
none (Hybrid watermarks ≠ swarm clusters / parquet round-trip / export-partition) | No |
No failing test intersects the Hybrid-watermark code path or fails above the all-PR baseline.
Recommendations
- Safe to merge. Rerunning the 3 flaky PR-test jobs may clear them, but it is not blocking.
- Re-verify after the companion 26.1 → 26.3 frontports land (Antalya 26.1; Remote initiator improvements 2 #1608/Antalya 25.8: Remote initiator improvements 2 #1638, Fix attempt to create table from table function #1701, Cherry-pick: Fix: system.databases always shows data lake catalog databases #1690) — the chronic regression failures should drop noticeably once those land.
- The Stress arm_asan
Unknown errorrecurring across 5 PRs onantalya-26.3since late April is worth one shared investigation/tracking issue if not already filed. - Same chronic-baseline cleanup recommendation as
VERIFICATION_PR_1640.mdfor swarms / parquet / s3_export_partition scenarios.
Local checkout
cd /Users/alsugilyazova/workspace/altinity-clickhouse/ClickHouse
gh pr checkout 1723 --repo Altinity/ClickHouse
# HEAD: ee97139559e9a1849045aa6133825e4a026b8bc9
PR #1723 audit — Hybrid watermarks
|
Antalya 26.1 - Add ALTER TABLE MODIFY SETTING support for Hybrid watermarks
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Added support for moving Hybrid table watermarks (#1659 by @mkmkme)
Documentation entry for user-facing changes
...
CI/CD Options
Exclude tests:
Regression jobs to run: