plusplusjiajia opened a new pull request, #837:
URL: https://github.com/apache/paimon-rust/pull/837

   ## Purpose
   
   Ports apache/paimon#9410 to Rust: six `CALL sys.*` procedures putting the 
REST management API (#820, #829) behind SQL. Java chose procedures over DDL, 
and its SQL extension grammar has no `GRANT`/`REVOKE`/`POLICY` at all.
   
   ## What it adds
   
       CALL sys.grant_permission(resource_type => 'TABLE', database => 'sales',
                                 table => 'orders', access => 'SELECT',
                                 principal => 'user:alice')
   
   plus `revoke_permission`, `list_permissions`, `create_policy`, `drop_policy` 
and `list_policies`. Procedure names, parameter names and optionality, and the 
two result schemas follow Java field for field.
   
   ## Notes for review
   
   - **Two additions to `paimon`'s public API.** `Catalog` gains a required 
`as_any`: the six client methods live only on `RESTCatalog`, and `execute_call` 
holds `Arc<dyn Catalog>`. Java downcasts for the same reason 
(`BasePermissionProcedure.java:56-68`), so the methods stay off the trait as 
#820 decided; external implementors of `Catalog` will need one line. 
`api::is_blank` becomes public because these procedures reimplement Java's 
`emptyToNull` and must use that exact predicate rather than `str::trim`, which 
disagrees on a non-breaking space.
   - **Multi-value arguments are comma-separated, not arrays**: `column_names 
=> 'id, region'`. `CALL` arguments reach this crate as strings, and 
`sys.delete_tag` already takes `tag => 'v1,v2'`.
   - **Writes return the crate's `result: 'OK'` rather than Java's boolean**, 
so all fourteen procedures here agree.
   
   ## Testing
   
   Eighteen tests against the mock REST server, and an end-to-end run against a 
live Aliyun DLF catalog covering all six procedures, both paging filters, both 
`if_exists` paths and the duplicate-policy 409.
   


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