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

     
     This PR adds support for querying Apache Paimon system tables, enabling 
users to inspect metadata and operational information about Paimon tables 
directly through SQL queries.
      For complete system table reference and advanced usage patterns, see the 
[Apache Paimon System Tables 
Documentation](https://paimon.apache.org/docs/master/concepts/system-tables/).
   
   ## Usage Examples
   
   ### Basic System Table Query
   ```sql
   -- Query snapshot information
   SELECT * FROM my_table$snapshots;
   ```
   ```sql
   -- Query manifest details
   SELECT * FROM my_table$manifests;
   ```
   ```sql
   -- Query schema evolution
   SELECT * FROM my_table$schemas;
   ```
   ### Advanced Operations
   ```sql
   -- Filter snapshots by commit time
   SELECT snapshot_id, commit_user, commit_time 
   FROM my_table$snapshots 
   WHERE commit_time > '2025-01-01'
   ORDER BY commit_time DESC;
   ```
   ```sql
   -- Join snapshots with schemas
   SELECT s.snapshot_id, sc.fields 
   FROM my_table$snapshots s 
   JOIN my_table$schemas sc ON s.schema_id = sc.schema_id;
   ```
   Sample Output
   ```sql
   mysql> SELECT * FROM my_table$snapshots;
   
+-------------+-----------+--------------------------------------+---------------------+-------------+-------------------------+------------------------------------------------------+------------------------------------------------------+-------------------------+--------------------+--------------------+------------------------+----------------------+
   | snapshot_id | schema_id | commit_user                          | 
commit_identifier   | commit_kind | commit_time             | 
base_manifest_list                                   | delta_manifest_list      
                            | changelog_manifest_list | total_record_count | 
delta_record_count | changelog_record_count | watermark            |
   
+-------------+-----------+--------------------------------------+---------------------+-------------+-------------------------+------------------------------------------------------+------------------------------------------------------+-------------------------+--------------------+--------------------+------------------------+----------------------+
   |           1 |         0 | d7ea4996-92c7-469f-b9ff-c76525954f1c | 
9223372036854775807 | APPEND      | 2025-03-04 22:48:45.575 | 
manifest-list-dc5490ba-420c-445a-b6f7-6962d394935c-0 | 
manifest-list-dc5490ba-420c-445a-b6f7-6962d394935c-1 | NULL                    
|                  1 |                  1 |                      0 | 
-9223372036854775808 |
   
+-------------+-----------+--------------------------------------+---------------------+-------------+-------------------------+------------------------------------------------------+------------------------------------------------------+-------------------------+--------------------+--------------------+------------------------+----------------------+
   ```
   
   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [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 <!-- Add your reason?  -->
   
   - Behavior changed:
       - [x] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [x] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


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