Skip to content

Export partition (Antalya 26.6) - allow non matching partition expressions in case we can prove the destination expression does not split the data - #2253

Open
arthurpassos wants to merge 5 commits into
antalya-26.6from
feature/antalya-26.6/export-partition-monotonic-compat
Open

Export partition (Antalya 26.6) - allow non matching partition expressions in case we can prove the destination expression does not split the data#2253
arthurpassos wants to merge 5 commits into
antalya-26.6from
feature/antalya-26.6/export-partition-monotonic-compat

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):

Allow export partition through different partition expressions as long as the destination expression does not repartition the data. This is validated at schedule time through two mechanisms:

  1. Structural match: in case the source and destination are identical, the destination expression is a subset of the source expression or the destination expression can be entirely computed using only constants and the exact values guaranteed (pinned) by the source.
  2. Dynamic proof: the destination expression is monotonic over the source partition min/max range.

Documentation entry for user-facing changes

...

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful 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)

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

Workflow [PR], commit [8af5237]

@arthurpassos arthurpassos changed the title port flexible exports Export partition - allow non matching partition expressions in case we can prove the destination expression does not split the data Aug 21, 2026
@arthurpassos arthurpassos changed the title Export partition - allow non matching partition expressions in case we can prove the destination expression does not split the data Export partition (Antalya 26.6) - allow non matching partition expressions in case we can prove the destination expression does not split the data Aug 21, 2026
@arthurpassos
arthurpassos marked this pull request as ready for review August 24, 2026 13:26
@arthurpassos arthurpassos added antalya port-antalya PRs to be ported to all new Antalya releases antalya-26.6 labels Aug 24, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8af52375ff

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +166 to +168
for (const auto & part : parts)
if (exported.contains(part->name))
minmax.merge(*part->getMinMaxIndex());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve partition values before exported parts are cleaned

When a replicated Iceberg export runs longer than old_parts_lifetime, merges can make every manifest-listed part outdated and cleanup can then remove them all. This loop accepts only exact part names, so every subsequent commit attempt finds an uninitialized min/max index and retries until the task timeout even though all data files were exported; the retry cannot recover because those part names will not reappear. Persist the representative partition values at scheduling time, or otherwise retain a safe derivation that survives source-part cleanup.

Useful? React with 👍 / 👎.


The Iceberg manifest files contain statistics about the data. Exporting a merge tree partition is a non ephemeral long running task, in which nodes can be turned off and turned on. This means the stats of individual files need to be persisted somewhere in order to produce the final manifest. This is implemented through sidecars. Each data file exported will contain a "sibling" sidecar file named `<data_file_name>_clickhouse_export_part_sidecar.avro`. ClickHouse does not clean up these files, and they can be safely deleted once the data is comitted.

#### Source partition key compatibility

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add the mandatory anchor to the new heading

This newly added documentation heading has no explicit {#kebab-case-anchor} suffix, contrary to the repository requirement for every heading under docs/; add an anchor such as {#source-partition-key-compatibility} so generated navigation and direct links use the required stable target.

AGENTS.md reference: AGENTS.md:L9-L9

Useful? React with 👍 / 👎.

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

Labels

antalya antalya-26.6 port-antalya PRs to be ported to all new Antalya releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant