Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Dec 9, 2025

Cherry-picked from #58755

…bles (#58755)

### What problem does this PR solve?

- **Issue Number**: part of #58199
- **Related PR**: N/A

Problem Summary:
This PR implements the `publish_changes` action for Iceberg tables. This
action serves as the "Publish" step in the Write-Audit-Publish (WAP)
pattern. The procedure locates a snapshot tagged with a specific
`wap.id` property and cherry-picks it into the current table state. This
allows users to atomically make "staged" data visible after validation.

Syntax:
```sql
EXECUTE TABLE catalog.db.table_name publish_changes("wap_id" = "batch_123");
````

Output:
Returns `previous_snapshot_id` (STRING) and `current_snapshot_id`
(STRING) indicating the state transition.

Use cases:

1.  Implement Write-Audit-Publish (WAP) workflows.
2.  Atomically publish validated data to the main branch.
3.  Manage staged snapshots based on custom WAP IDs.

Co-authored-by: Chenjunwei <[email protected]>
@github-actions github-actions bot requested a review from yiguolei as a code owner December 9, 2025 14:32
@Thearas
Copy link
Contributor

Thearas commented Dec 9, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring closed this Dec 9, 2025
@dataroaring dataroaring reopened this Dec 9, 2025
@Thearas
Copy link
Contributor

Thearas commented Dec 9, 2025

run buildall

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants