mchades opened a new pull request, #11242:
URL: https://github.com/apache/gravitino/pull/11242
### What changes were proposed in this pull request?
This PR introduces a dedicated `REPLACE_VIEW` operation type for Iceberg
replace-view events and propagates it through audit operation mapping.
Changes include:
- Add `REPLACE_VIEW` to listener `OperationType`.
- Add `REPLACE_VIEW` to `AuditLog.Operation`.
- Map `OperationType.REPLACE_VIEW` to `Operation.REPLACE_VIEW` in
compatibility mapping.
- Update `IcebergReplaceViewPreEvent`, `IcebergReplaceViewEvent`, and
`IcebergReplaceViewFailureEvent` to return `REPLACE_VIEW`.
- Update tests:
- `TestCompatibilityUtils`
- `TestIcebergViewOperations`
### Why are the changes needed?
Previously, Iceberg replace-view events were audited as `ALTER_VIEW`, which
made it impossible to distinguish alter vs replace from audit rows alone.
Fix: #11241
### Does this PR introduce _any_ user-facing change?
Yes.
Audit `operationType` now emits `REPLACE_VIEW` for Iceberg replace-view
operations.
### How was this patch tested?
- `./gradlew :core:spotlessApply :iceberg:iceberg-rest-server:spotlessApply`
- `./gradlew :core:test --tests
org.apache.gravitino.audit.v2.TestCompatibilityUtils
:iceberg:iceberg-rest-server:test --tests
org.apache.gravitino.iceberg.service.rest.TestIcebergViewOperations`
--
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]