Repository navigation
Stable 26.3 Backport of #128217 - Evaluate the PARTITION BY expression of file and object storage writes once per INSERT, not once per block - #2908
Conversation
…tateful-function-spans-chunks Evaluate the `PARTITION BY` expression of file and object storage writes once per INSERT, not once per block Conflicts committed as-is; the next commit resolves them: - src/Storages/IPartitionStrategy.cpp (both modified) - src/Storages/IPartitionStrategy.h (both modified)
Adapted the PR to stable-26.3's non-const strategy API, which has no `getCachedOrBuildActions`, and kept a one-argument `computePartitionKey` for the DeltaLake sink.
|
Port-AL: cherry-pick conflicts resolved by AI Conflicted files:
Commits:
|
CI triage for 82ec992Verdict: 4 failing checks. None are caused by this PR. 1 is infra (crash during install, before any test ran), 2 are pre-existing (Grype CVE scans, same result on #2899), and 1 is expected for backports (DCO). The infra failure did one more thing: praktika dropped about 30 downstream jobs (integration, stress, fuzzers, sequential stateless, SQLLogic). Coverage for this backport is incomplete until that job is re-run.
1. Stateless tests (amd_asan, distributed plan, parallel, 3/4): infraThe only failing "test" is Evidence that the PR didn't cause it:
Next step: re-run this job (or the failed jobs of run 44344552760). The re-run should also bring back the dropped integration, stress, fuzzer and sequential suites, which this storage-sink change should get before merge. I could not confirm from the report that the new 2. Grype scans (keeper, server-alpine): pre-existing
3. DCO: expected for backportsCommit Suggested fixes for PR-related failuresNone needed. Re-run the ASan 3/4 job so the dropped suites run. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed
PARTITION BYoffile,urland object storage writes (table functions and table engines) evaluating stateful and non-deterministic functions anew for every block since 26.1:PARTITION BY intDiv(rowNumberInAllBlocks(), N)restarted its counter on every block and wrote rows into the wrong files, andnow64()produced one file per block instead of one perINSERT. Closes ClickHouse#128211. (ClickHouse#128217 by @groeneai)Documentation entry for user-facing changes
...
CI/CD Options
Exclude tests:
Regression jobs to run: