mchades opened a new pull request, #10924: URL: https://github.com/apache/gravitino/pull/10924
### What changes were proposed in this pull request? This PR implements `ViewOperationDispatcher` and `ViewNormalizeDispatcher` with proper entity-store coordination. Key changes: - Add `Capability.Scope.VIEW` to the `Scope` enum; fix `CapabilityHelpers` to include VIEW scope in namespace normalization and capability application - Align `internalLoadView`: add managed entity check, string identifier path, and `withHiddenProperties` on all return paths - Align `importView`: use `overwrite=true`, reuse uid from string identifier, throw `UnsupportedOperationException` for `EntityAlreadyExistsException` - Add `validatePropertyForCreate` to `internalCreateView` and `validateAlterProperties` to `alterView` - Fix `applyChangesToEntity` to read comment/defaultCatalog/defaultSchema from `alteredView` (not from `ViewChange` objects) - Add `ViewChange.SetProperty`/`RemoveProperty` handling to `OperationDispatcher` - Add `withHiddenProperties` to all `alterView` return paths - Add JavaDoc to all public methods in `ViewOperationDispatcher` - Add `ViewNormalizeDispatcher` with full implementation ### Why are the changes needed? `ViewOperationDispatcher` was missing several key behaviors compared to the expected implementation: 1. Missing `Capability.Scope.VIEW` caused view namespace normalization to be skipped silently 2. `internalLoadView` used a naive try/catch instead of the managed entity + string identifier pattern 3. `importView` used `overwrite=false` and silently swallowed all errors 4. `validatePropertyForCreate` and `validateAlterProperties` were absent 5. `applyChangesToEntity` read properties from `ViewChange` objects instead of the altered view Fix: #10923 ### Does this PR introduce _any_ user-facing change? No user-facing API changes. Internal behavior improvements: view property validation now enforced on create/alter, hidden properties correctly filtered from API responses, view namespace case sensitivity correctly handled via capabilities. ### How was this patch tested? - Added `TestViewNormalizeDispatcher` covering all normalization scenarios - Extended `TestViewOperationDispatcher` to cover property validation, hidden properties, and all alter/drop scenarios - All existing tests pass -- 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]
