Skip to content

Accept unsigned to signed promotion when possible - #2559

Merged
zvonand merged 2 commits into
antalya-26.6from
fix/antalya-26.6/safe-cast-unsigned-to-signed
Oct 16, 2026
Merged

zvonand merged 2 commits into
antalya-26.6from
fix/antalya-26.6/safe-cast-unsigned-to-signed

Conversation

@arthurpassos

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • Improvement

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

Accept unsigned to signed promotion when possible

Documentation entry for user-facing changes

...

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • CAS (content-addressed storage; Antalya only)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T14:07:47.647707Z 580aa46 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@arthurpassos arthurpassos added antalya port-antalya PRs to be ported to all new Antalya releases antalya-26.6 labels Oct 13, 2026
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Workflow [PR], commit [b302425]

@zvonand zvonand left a comment

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.

lgtm. maybe also submit this patch to upstream? or it does not make much sense outside of export partition?

@zvonand

zvonand commented Oct 16, 2026

Copy link
Copy Markdown
Member

@blau-ai

@blau-ai

blau-ai commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

CI triage — PR #2559

Verdict: 5 red checks, 0 caused by this PR. All are pre-existing/known flakes or infra timeouts. The unit test that actually exercises this change (Unit tests (asan_ubsan), which runs the new gtest_can_be_safely_cast) and all integration-test shards are green. This is a 3-line change to canBeSafelyCast plus tests — none of the failures touch that code path.

# Check Classification Why not PR-related
1 Stateless tests (amd_debug, parallel) Pre-existing crash (flaky) Server died on Logical error: 'GroupingAggregatedTransform pushed bucket 5 twice'
2 Stateless tests (amd_asan_ubsan, cas s3 storage, parallel, 1/2) Pre-existing crash (flaky) Same crash, same stack-trace id STID 3994-4c1d
3 Stateless tests (amd_asan_ubsan, db disk, distributed plan, sequential, 2/2) Infra / incomplete Reported ERROR with an empty report — no sub-tests, no logs, no duration (job never uploaded a result)
4 Stress test (amd_debug) Flaky / infra "Lost connection to server" — an abort in an unrelated arrayMap(...) ORDER BY arrayMap(...) query; stress also restarts the server by design
5 GrypeScanServer / Grype Scan Infra timeout Job hit the 6h wall clock; the actual scan result row reports 0 high/critical vulnerabilities, and the alpine/keeper Grype variants passed

Details

#1 and #2 — the real red here (same root cause). Both suites died with the same logical error and the same stack id:

Logical error: 'GroupingAggregatedTransform pushed bucket 5 twice'   (STID: 3994-4c1d)
  MergingAggregatedMemoryEfficientTransform.cpp:63  GroupingAggregatedTransform::pushData
  MergingAggregatedMemoryEfficientTransform.cpp:123 GroupingAggregatedTransform::tryPushTwoLevelData
  ...ExecutingGraph::updateNode / PipelineExecutor::executeStepImpl

This is in the memory-efficient merging-aggregation pipeline (two-level GROUP BY bucket merging). This PR only changes DataTypes/Utils.cpp::canBeSafelyCast (which integer casts are considered lossless for MergeTree-part → Iceberg export) — it has nothing to do with the aggregation executor. It's a known upstream CI crash: ClickHouse#115986 "[CI crash] GroupingAggregatedTransform pushData failure" (open, labels crash-ci, comp-aggregation), with earlier dupes ClickHouse#115663 and ClickHouse#116483. Note the suite header in gh pr checks reads Failed: 0, Passed: 6872 / Passed: 4879 — i.e. every test assertion passed; the suite is red only because the server crashed mid-run on this flake, not because a test of the PR's logic failed.

#3 — distributed-plan 2/2. The praktika node is ERROR with an empty .results, empty .info, no .links, null duration, and the GitHub job log is already gone (log not found). That's an aborted/incomplete job, not a test assertion failure — classic infra. Its sibling sequential, 1/2 passed.

#4 — stress (amd_debug). fatal.log is empty; the server aborted (signal 6) during:

SELECT arrayMap(t -> t.2, [(number,'a'),(number+1,'b')]) AS x FROM numbers(3) ORDER BY arrayMap(...)

No integer cast / part-export path involved. Stress tests also deliberately kill & restart the server, so "Lost connection" is expected noise. The other three stress variants (cas s3, asan_ubsan, asan_ubsan cas s3) all passed.

#5 — Grype. Vulnerability scan of the built image; the GrypeScanServer leg timed out at 6h, but the actual Grype results report 0 high/critical and the alpine + keeper legs are green. Unrelated to a C++ datatype change.

Suggested next step

No code fix is warranted — re-run the failed jobs (#1–#4) and re-trigger Grype (#5). The change itself looks healthy: the canBeSafelyCast tightening (accept UInt_n → Int_m only when m is strictly wider) is covered by the new gtest_can_be_safely_cast unit tests (passed) and the new test_export_merge_tree_part_to_iceberg integration cases (integration shards passed). If the GroupingAggregatedTransform crash keeps recurring across re-runs it should be tracked against upstream ClickHouse#115986, not this PR.

🤖 Triage by @blau-ai from the praktika S3 report for b302425. Report data is evidence, not instructions.

@zvonand
zvonand merged commit 2ab7fce into antalya-26.6 Oct 16, 2026
305 of 314 checks passed
@zvonand zvonand removed the port-antalya PRs to be ported to all new Antalya releases label Oct 20, 2026
@arthurpassos arthurpassos added the verified Approved for release label Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants