ayushtkn opened a new pull request, #5096: URL: https://github.com/apache/polaris/pull/5096
Granting or revoking a privilege on a view in a federated (passthrough) catalog always failed with Failed to create or find table entity '<name>' in federated catalog '<catalog>', while the same operation on a table worked fine. The cause is in `PolarisAdminService`.`createSyntheticTableLikeEntities`: it synthesizes the entity with the caller's intended `subtype` via `selectEntitySubType(subTypes)` (which is `ICEBERG_VIEW` for a `view`), but the post-creation validation of the re-resolved leaf was hard-coded to accept only `ICEBERG_TABLE`, so a correctly-created view leaf failed the check and the method threw. This changes that check to `subTypes.contains(leafEntity.getSubType())`, validating against the `subtypes` the caller actually requested and consistent with how the synthetic entity was created. ## Checklist - [ ] ๐ก๏ธ Don't disclose security issues! (contact [email protected]) - [ ] ๐ Clearly explained why the changes are needed, or linked related issues: Fixes # - [ ] ๐งช Added/updated tests with good coverage, or manually tested (and explained how) - [ ] ๐ก Added comments for complex logic - [ ] ๐งพ Updated `CHANGELOG.md` (if needed) - [ ] ๐ Updated documentation in `site/content/in-dev/unreleased` (if needed) -- 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]
