Stephen0421 opened a new pull request, #10437:
URL: https://github.com/apache/paimon/pull/10437
## Purpose
Add the Flink procedures `sys.grant_permission`, `sys.revoke_permission`,
and `sys.list_permissions`, matching the existing Spark procedures.
They call `RESTCatalog.permissionManagement()` and do not change the REST
API or the `Catalog` interface. A filesystem catalog fails with `Catalog does
not support permission management.`
These procedures require Flink 1.19 or later. Column ranges are passed as
comma-separated names, for example `column_names => 'order_id,region'`.
`list_permissions` still returns `column_names` and `excluded_column_names` as
`ARRAY<STRING>`. A column name that itself contains a comma cannot be
represented.
```sql
CALL sys.grant_permission(
resource_type => 'TABLE',
`database` => 'sales',
`table` => 'orders',
access => 'SELECT',
principal => 'user:alice'
);
```
## Test
- [x] `PermissionProcedureITCase`: grant, replace, list, and idempotent
revoke; pagination; `CATALOG_ALL` and `DATABASE_ALL`; column allowlist and
denylist; positional 8-argument and 10-argument calls
- [x] Invalid `resource_type`, empty `principal`, both column lists, and
column names on a non-`COLUMN` resource are rejected
- [x] `PermissionProcedureUnsupportedCatalogITCase`: a filesystem catalog is
rejected
--
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]