zhan7236 opened a new pull request, #58539:
URL: https://github.com/apache/doris/pull/58539

   ### What problem does this PR solve?
   
   - **Issue Number**: close #58199 (partial)
   - **Related PR**: N/A
   
   **Problem Summary:**
   
   This PR implements the `ancestors_of` procedure for Iceberg tables. The 
procedure reports the live snapshot IDs and timestamps of the ancestors of a 
specified snapshot, helping users trace snapshot lineage and understand the 
commit history of a table.
   
   **Syntax:**
   
   ```sql
   ALTER TABLE catalog.db.table_name EXECUTE ancestors_of();
   ALTER TABLE catalog.db.table_name EXECUTE ancestors_of("snapshot_id" = 
"123456789");
   ```
   
   **Output:**
   Returns `snapshot_id` (BIGINT) and `timestamp` (BIGINT) for each ancestor 
snapshot.
   
   **Use cases:**
   - Locate rollback targets
   - Debug commit relationships
   - Understand table evolution history
   
   ### Release note
   
   Support `ancestors_of` procedure for Iceberg tables to report snapshot 
ancestry chain.
   
   ### Check List (For Author)
   
   **Test**
   
   - [x] Regression test
   - [ ] Unit Test
   - [ ] Manual test (add detailed scripts or steps below)
   - [ ] No need to test or manual test. Explain why:
     - [ ] This is a refactor/code format and no logic has been changed.
     - [ ] Previous test can cover this change.
     - [ ] No code files have been changed.
     - [ ] Other reason
   
   **Behavior changed:**
   
   - [x] No.
   - [ ] Yes.
   
   **Does this need documentation?**
   
   - [x] No.
   - [ ] Yes. 
   
   ### Check List (For Reviewer who merge this PR)
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to