suxiaogang223 opened a new issue, #58199:
URL: https://github.com/apache/doris/issues/58199

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Description
   
   ## Summary
   
   This is a tracking issue for implementing the remaining Apache Iceberg 
procedures in Doris. Currently, Doris has implemented 7 out of 20 Iceberg 
procedures. This issue tracks the implementation status and provides a roadmap 
for the remaining procedures.
   
   ## Reference Documentation
   
   - **Iceberg Procedures Documentation**: 
https://iceberg.apache.org/docs/latest/spark-procedures/
   - **Doris Iceberg Catalog Documentation**: 
https://doris.apache.org/docs/3.x/lakehouse/catalogs/iceberg-catalog#iceberg-table-actions
   
   ## Current Syntax
   
   Doris uses the `ALTER TABLE EXECUTE` syntax to execute Iceberg procedures:
   
   ```sql
   ALTER TABLE [catalog_name.][database_name.]table_name 
   EXECUTE procedure_name 
   (property_key = property_value, ...)
   [PARTITION (partition_name, ...)]
   [WHERE condition]
   ```
   
   ### Examples
   
   ```sql
   -- Rollback to a specific snapshot
   ALTER TABLE iceberg_db.my_table EXECUTE rollback_to_snapshot ("snapshot_id" 
= "123456789");
   
   -- Rollback to a timestamp
   ALTER TABLE iceberg_db.my_table EXECUTE rollback_to_timestamp ("timestamp" = 
"2024-01-01T00:00:00");
   
   -- Set current snapshot
   ALTER TABLE iceberg_db.my_table EXECUTE set_current_snapshot ("snapshot_id" 
= "123456789");
   
   -- Cherry-pick snapshot
   ALTER TABLE iceberg_db.my_table EXECUTE cherrypick_snapshot ("snapshot_id" = 
"123456789");
   
   -- Fast-forward branch
   ALTER TABLE iceberg_db.my_table EXECUTE fast_forward ("branch" = 
"feature_branch", "snapshot_id" = "123456789");
   
   -- Expire snapshots
   ALTER TABLE iceberg_db.my_table EXECUTE expire_snapshots ("older_than" = 
"2024-01-01T00:00:00", "retain_last" = "5");
   
   -- Rewrite data files
   ALTER TABLE iceberg_db.my_table EXECUTE rewrite_data_files (
       "target-file-size-bytes" = "536870912",
       "min-input-files" = "5",
       "max-file-size-bytes" = "1073741824"
   );
   ```
   
   For more details, see the [Doris Iceberg Catalog 
documentation](https://doris.apache.org/docs/3.x/lakehouse/catalogs/iceberg-catalog#iceberg-table-actions).
   
   
   ### Use case
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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

Reply via email to