vinlee19 opened a new pull request, #53327:
URL: https://github.com/apache/doris/pull/53327
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
This PR introduces comprehensive support for Paimon time travel
functionality.
## Time Travel Queries
1. Query by Snapshot ID (Version-based)
```sql
-- Basic version-based query
SELECT * FROM tbl_time_travel FOR VERSION AS OF 1 ORDER BY order_id;
```
2. Query by Timestamp (Time-based)
```sql
sql-- Query by time string
SELECT * FROM tbl_time_travel FOR TIME AS OF "2024-07-15 10:30:00.000" ORDER
BY order_id;
```
```sql
-- Query by millisecond timestamp
SELECT * FROM tbl_time_travel FOR TIME AS OF 1721030400000 ORDER BY order_id;
```
3. Query by Tag Name
```sql
-- Query by tag name
SELECT * FROM tbl_time_travel FOR VERSION AS OF 't_1' ORDER BY order_id;
```
## Branch Reading Queries
```sql
-- Basic branch query
SELECT * FROM tbl_time_travel@branch(b1) ORDER BY order_id;
```
```sql
-- Count with map format
SELECT * FROM tbl_time_travel@branch("name"="b1");
```
## Tag Reading Queries
```sql
-- Basic tag query
SELECT * FROM tbl_time_travel@tag(t_1) ORDER BY order_id;
```
```sql
-- Basic tag query with map format
SELECT * FROM tbl_time_travel@tag("name"="t_1") ORDER BY order_id;
```
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [x] Regression test
- [ ] Unit Test
- [x] 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]