LuciferYang opened a new issue, #10283:
URL: https://github.com/apache/paimon/issues/10283

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found no similar issues.
   
   ### Paimon version
   
   master (1.5-SNAPSHOT)
   
   ### Compute Engine
   
   Any engine using tag preview time travel (auto-tag WATERMARK / PROCESS_TIME 
mode).
   
   ### Minimal reproduce step
   
   1. A table with tag auto-creation in preview mode and at least one manually 
created tag.
   2. Do a preview time travel whose target is resolved by the `tags()` 
fallback (i.e. `tagExists` misses and the live-snapshot traversal misses, so it 
falls to scanning all tagged snapshots).
   
   ### What doesn't meet your expectations?
   
   `TagPreview.timeTravel`'s fallback streams every tagged snapshot's tag group 
through `toOneAutoTag` inside a `.max()`. `toOneAutoTag` calls 
`checkAndGetOneAutoTag`, which does `checkState(autoTags.size() == 1)`. For a 
snapshot that has only manual tags, `autoTags` is empty, so it throws 
`IllegalStateException: There are more than 1 auto-created tags of the same 
snapshot: .` — a misleading message, since there are zero. Because `.max()` 
evaluates every group, one manual-only group poisons the whole fallback. Two 
effects: a preview target that genuinely can't be resolved throws that 
misleading error instead of the clean `Cannot find snapshot or tag`, and a 
valid auto tag `<=` the requested point that lives on another (often expired) 
tagged snapshot is never returned.
   
   ### Anything else?
   
   Manual vs auto is distinguished by name format 
(`TagPeriodHandler.isAutoTag`), so an ordinary manual tag name is non-auto and 
yields an empty group.
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!
   


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

Reply via email to