Skip to content

Backport #115832 to 26.7: Support decimal types for writing in data lakes - #116859

Merged
clickhouse-gh[bot] merged 5 commits into
26.7from
backport/26.7/115832
Sep 8, 2026
Merged

clickhouse-gh[bot] merged 5 commits into
26.7from
backport/26.7/115832

Conversation

@robot-clickhouse-ci-2

@robot-clickhouse-ci-2 robot-clickhouse-ci-2 commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #115832

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.7.7.46

@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-backport Changes, backported to release branch. Do not use manually - automated use only! label Aug 28, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [feeb3d0]

Summary: ✅

The automatic backport dropped the local `field_id` binding in
`extendSchemaForPartitions`, so `getAvroType(partition_types[i], field_id)`
referenced an undeclared identifier and every build job failed.

On 26.7 the partition field ids are always assigned sequentially from 1000
(the `spec_has_all_ids` logic on `master` comes from a different change), so
bind the id once and reuse it for both `field_id` and `getAvroType`.
Resolve the conflict in `extendSchemaForPartitions`: `26.7` now derives the
partition `field_id` from the persisted partition spec (falling back to the
sequential ids starting at 1000), which supersedes the plain fallback binding
added here to fix the build. Keep the branch version and pass that
`field_id` to the two-argument `getAvroType` introduced by this backport.
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 @groeneai, investigate the failure: Stateless tests (amd_asan_ubsan, distributed plan, parallel) and provide a fix in a separate PR. If the fix is already in progress, link it here.

It is unrelated to this backport (which only touches Iceberg writes): the server aborts on Logical error '!part.empty()' while running 04367_lambda_arg_backquoted_dot_no_logical_error, i.e. chassert(!part.empty()) in the ASTIdentifier parts constructor, and the following Server died is a consequence of that abort. It reproduces only in the distributed plan configuration, and it happens on plain master runs (pull_request_number = 0, most recently 2026-09-05) as well as on unrelated 26.7 pull requests (#117854, #117752, #117151, …) — see the CIDB history:

SELECT toStartOfDay(check_start_time) AS day, count(), groupUniqArray(pull_request_number)
FROM checks
WHERE check_start_time > now() - INTERVAL 21 DAY
  AND test_name LIKE 'Logical error%part.empty%'
  AND test_status IN ('FAIL', 'ERROR')
GROUP BY day ORDER BY day DESC

Note that the original fix for that test, #108735, is already present on both master and 26.7, so the distributed plan path reaches the same assertion through some other place that rebuilds the lambda argument identifier by splitting on .. There is no open tracking issue for it (STID 2508-47d5).

@groeneai

groeneai commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

The stack on that row (sha 414f0262, that same check) is not the ASTIdentifier assertion:

abortOnFailedAssertion
MergingAggregatedMemoryEfficientTransform.cpp:62   GroupingAggregatedTransform::pushData
MergingAggregatedMemoryEfficientTransform.cpp:83   (lambda)
MergingAggregatedMemoryEfficientTransform.cpp:104  tryPushTwoLevelData
MergingAggregatedMemoryEfficientTransform.cpp:218  prepare
ExecutingGraph::updateNode

Line 62 on 26.7 is chassert(bucket < 0 || pushed_buckets.insert(bucket).second, fmt::format("Bucket {} is pushed twice", bucket)), so the abort is the two-level bucket double push. #108735 is present and belongs to a different family (STID 2508-2ef2).

The !part.empty() in the report name is scraped text, not the assertion that fired. Two controls:

  • The same STID, in the same check, on plain 26.7, also reports under its genuine spelling Logical error: 'Bucket 5 is pushed twice' on 09-04 and 09-05. ci/jobs/scripts/log_parser.py:309 builds a real name as f"Logical error: {format_message}", with the colon; the colon-less form is a raw literal match.
  • Over 21 days the colon-less spelling is confined to the 26.7 line: 15 rows, all on 26.7 or a branch targeting it (backport/26.7/117011, backport/26.7/115832, backport/26.7/109331, fix-02995-settings-history-26-7), 0 anywhere else. Line 2 of 04367_lambda_arg_backquoted_dot_no_logical_error.sql on 26.7 still reads used to abort the server with Logical error '!part.empty()'; Fix log-check false positive from test 04367 comments #111435 reworded master's copy; 26.6 does not carry that test at all and reports only the genuine spelling.

It is also not reproducing on master. Every pull_request_number = 0 row in that history is head_ref 26.7 or 26.6, which the query does not separate. The only true-master row for this STID in 21 days is 2026-08-19, two days before #115487 merged, and it carried the genuine spelling. Since #115487 the same condition throws instead of aborting on master (STID 3994-4c1d, 0 true-master rows, PRs only), so master no longer produces a Server died for it.

What no merged fix covers: the consumer-side backports are in, and the abort continues on commits that contain them.

branch backport merged later failing commit that contains it
26.7 #115782 2026-09-03 18:39Z 86fb708e 09-04, 668b83ea 09-05, 3fa68ee3 09-06 (Stress arm_debug)
26.6 #117377 2026-08-31 3face8c3 09-07

The surviving producer is the distributed-plan Shuffle aggregation, and the fix already in progress for it is #116446 (open, not yet reviewed). That also accounts for the config restriction you saw: make_distributed_plan is experimental and defaults to false, so only the --distributed-plan configs reach that path. #115487 and #114523 are present in #116446 and are out of scope for it, which is why their backports did not close these rows.

There is an open tracking issue as well: #115986, [CI crash] GroupingAggregatedTransform pushData failure, open since 2026-08-23 with crash-ci and comp-aggregation.

So I am not opening a separate PR for this one: #116446 is the fix, and 26.7 and 26.6 stay exposed to the abort form until it reaches them.

@clickhouse-gh
clickhouse-gh Bot merged commit 7423b03 into 26.7 Sep 8, 2026
39 of 40 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.7/115832 branch September 8, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants