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

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Motivation
   
   Introduce Archive ability to object store just like OSS and S3.
   Spark SQL:
   ```sql
   ALTER TABLE t PARTITION(dt = '20250101') ARCHIVE;
   ALTER TABLE t PARTITION(dt = '20250101') COLD ARCHIVE;
   ```
   For this SQL, we should initiate a task to perform distributed archiving, 
archiving all files in the partition for each file.
   
   We can introduce methods to `FileIO`:
   ```java
   Optional<Path> archive(Path path, StorageType type);
   
   void restoreArchive(Path path, Duration duration);
   
   Optional<Path> unarchive(Path path, StorageType type);
   
   enum StorageType {
       Standard("Standard"),
       Archive("Archive"),
       ColdArchive("ColdArchive"),
   }
   ```
   
   Archive and unarchive can return new path, some file systems do not support 
in place archiving and require generating additional paths, this may need to 
commit table too.
   
   ### Solution
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] 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