yuqi1129 commented on code in PR #13128:
URL: https://github.com/apache/gravitino/pull/13128#discussion_r4004558271


##########
common/src/main/java/org/apache/gravitino/dto/MetalakeDTO.java:
##########
@@ -45,6 +47,11 @@ public class MetalakeDTO implements Metalake {
   @JsonProperty("audit")
   private AuditDTO audit;
 
+  @Nullable
+  @JsonProperty("owner")
+  @JsonInclude(JsonInclude.Include.ALWAYS)
+  private OwnerDTO owner;

Review Comment:
   Fixed in 50b8bdf62. `MetalakeDTO.equals()` and `hashCode()` now include the 
owner structurally by `name` and `type`, with tests for equal round-tripped 
owners and different owners. I also propagated the owner through 
`DTOConverters.toMetaLake()` / `GravitinoMetalake` and added Java client 
coverage.



##########
docs/open-api/metalakes.yaml:
##########
@@ -337,6 +337,24 @@ components:
           type: string
           description: A comment about the Metalake
           nullable: true
+        owner:
+          type: object
+          nullable: true
+          description: >-
+            The user or group owning the metalake, populated when listing 
metalakes.
+            Null when authorization is disabled, no owner is assigned, or 
ownership
+            was not loaded by the operation.
+          required:
+            - name
+            - type
+          properties:
+            name:
+              type: string
+              description: The owner name.
+            type:
+              type: string
+              enum: [user, group]
+              description: Whether the owner is a user or a group.

Review Comment:
   Fixed in 50b8bdf62. The metalake owner now references the canonical `Owner` 
schema, and the shared schemas/examples use lowercase `user` / `group` to match 
the actual Jackson wire format. `:docs:build` passes.



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