[Bug] Branches Table created_from_snapshot field result error.
Search before asking
- [X] I searched in the issues and found nothing similar.
Paimon version
master
Compute Engine
flink
Minimal reproduce step
First case
- create empty branch.
- insert some data to this branch.
- select * from t$branches.
Second case
- create branch from tag.
- delete branch's tag.
- wait branch's first snapshot expire.
- select * from t$branches.
In above two case,created_from_snapshot both should be null.
What doesn't meet your expectations?
In branches table, if we can't find tag from branches table,we will choose the earliestSnapshotId of branch to be created_from_snapshot.
But if tag not exists,it's hard for us to know whether the earliestSnapshotId of branch is the main branch' snapshot.So I pull request #4159 to fix this issue. created_from_snapshot must from earliestTag of branch.
But it's also have some problem, it's hard for us to know tag is from main branch. For example, if we create empty branch,then insert one data to this branch. Then we create a tag base on this branch's snapshot. create_from_tag and create_from_snaphot both should be null.but we can't judge if this tag is the main branch's tag.
Anything else?
No response
Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!