mchades opened a new pull request, #10855:
URL: https://github.com/apache/gravitino/pull/10855

   ### What changes were proposed in this pull request?
   
   Wire the `FUNCTION` entity type into Gravitino's core authorization
   infrastructure, following the model privilege pattern.
   
   Key changes:
   - **`FunctionHookDispatcher`** (new) — sets ownership on `registerFunction`, 
delegates all other operations; inserted into the dispatcher chain in 
`GravitinoEnv`
   - **`RelationalEntityStoreIdResolver`** — add `FUNCTION` to 
`ENTITY_TYPES_REQUIRING_SCHEMA_IDS` and implement the `FUNCTION` case using 
`FunctionMetaService.getFunctionIdBySchemaIdAndFunctionName`
   - **`FunctionMetaService`** — new `getFunctionIdBySchemaIdAndFunctionName` 
method
   - **`FunctionMetaMapper` / `FunctionMetaSQLProviderFactory` / 
`FunctionMetaBaseSQLProvider`** — new 
`selectFunctionIdBySchemaIdAndFunctionName` query
   - **`MetadataObjectService`** — `getFunctionObjectsFullName` for ownership 
look-up
   - **`MetadataObjectUtil`** — `FUNCTION` in `TYPE_TO_TYPE_MAP`, 
`toEntityIdent`, `checkMetadataObject`
   - **`NameIdentifierUtil`** — `FUNCTION` in `toMetadataObject` and 
`parentEntityType`
   
   ### Why are the changes needed?
   
   Without these plumbing changes the `OwnerManager` cannot resolve a
   `FUNCTION` entity ID, causing an `Unsupported entity type: FUNCTION`
   error when a function is registered.
   
   Fix: #9535
   
   ### Does this PR introduce _any_ user-facing change?
   
   No user-facing API changes. Internal plumbing only.
   
   ### How was this patch tested?
   
   Unit tests pass: `./gradlew :core:test -PskipITs`
   
   End-to-end integration test `FunctionAuthorizationIT` (in a follow-up PR) 
covers the full ownership and privilege flow.


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