paultanay opened a new pull request, #12655: URL: https://github.com/apache/gravitino/pull/12655
### What changes were proposed in this pull request? Fix the fileset schema location resolution logic in `AuthorizationUtils.getMetadataObjectLocation` so that when a schema does not specify an explicit `location` property (inheriting the catalog's location), it correctly falls back to `catalogLocation + "/" + schema.name()`. ### Why are the changes needed? Previously, the fallback check `else if (catalogObj.properties().containsKey(FILESET_CATALOG_LOCATION))` was nested inside `if (schema.properties().containsKey(FILESET_SCHEMA_LOCATION)`. When a schema relied on catalog location inheritance (where `schema.properties()` does not have the `"location"` key), the outer condition evaluated to `false`, returning an empty location list and preventing authorization plugins (e.g. Ranger HDFS) from generating or cleaning up storage path policies. Fix: #12654 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Expanded `TestAuthorizationUtils.testGetSchemaTypeMetadataObjectLocation` to cover all scenarios: 1. Schema without `location` property (inheriting catalog location). 2. Schema with `null` properties map. 3. Schema with empty string `location` property. 4. Schema with explicit `location` property override. 5. Catalog and schema both without `location` property. -- 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]
