TheR1sing3un opened a new pull request, #8319:
URL: https://github.com/apache/paimon/pull/8319

   ## Purpose
   
   `FileSystemCatalog.create_tag` rejected `time_retained` with 
`NotImplementedError`, and the Python `Tag` only inherited `Snapshot` fields, 
so `get_tag` and the `$tags` system table could only return `None` for 
create-time / TTL.
   
   This implements real tag `time_retained` support on the FileSystem path, 
persisting `tagCreateTime` / `tagTimeRetained` in the **same on-disk JSON shape 
as Java** (`org.apache.paimon.tag.Tag`) so tag files round-trip across the Java 
and Python SDKs.
   
   ## Changes
   
   - `Tag` now carries `tag_create_time` (LocalDateTime as a `[y, mo, d, h, mi, 
s, ns]` array) and `tag_time_retained` (Duration as decimal seconds), via a new 
per-field JSON codec.
   - `create_tag` / `replace_tag` thread `time_retained` through TagManager / 
FileStoreTable / FileSystemCatalog. With no retention, the plain Snapshot JSON 
is written (backward compatible), mirroring Java 
`TagManager.createOrReplaceTag`.
   - `get_tag` and the `$tags` system table surface real `create_time` / 
`time_retained` (matching Java `Timestamp.fromLocalDateTime` / 
`Duration.toString()`).
   - Tag expiration (TTL-based deletion) is intentionally out of scope.
   
   ## Tests
   
   Unit tests for the temporal codecs and Tag serde (Java golden-value shape, 
round-trip, reading Java-written tags, legacy plain-snapshot backward 
compatibility) plus FileSystemCatalog / `$tags` end-to-end coverage for 
create/replace with `time_retained`.
   
   ## Does this PR introduce a user-facing change?
   
   No.
   
   ---
   Generative AI disclosure: drafted with AI assistance and reviewed by the 
author.
   


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