ldsantos0911 commented on code in PR #15830:
URL: https://github.com/apache/iceberg/pull/15830#discussion_r3098067050


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -3823,6 +3941,164 @@ components:
           additionalProperties:
             type: string
 
+    CatalogObjectType:
+      type: string
+      description: |
+        The type of a catalog object.
+      enum:
+        - table
+        - view
+
+    LoadTableRelationResult:
+      description: |
+        Table branch of `LoadRelationResult`.
+        The `table` field contains the same payload as `LoadTableResult`.
+      type: object
+      required:
+        - object-type
+        - table
+      properties:
+        object-type:
+          $ref: '#/components/schemas/CatalogObjectType'
+          const: table
+        table:
+          $ref: '#/components/schemas/LoadTableResult'
+
+    LoadViewRelationResult:
+      description: |
+        View branch of `LoadRelationResult`.
+        The `view` field contains the same payload as `LoadViewResult`.
+      type: object
+      required:
+        - object-type
+        - view
+      properties:
+        object-type:
+          $ref: '#/components/schemas/CatalogObjectType'
+          const: view
+        view:
+          $ref: '#/components/schemas/LoadViewResult'
+
+    LoadRelationResult:
+      description: |
+        Result of loading a catalog relation. The `object-type` field 
discriminates between table and view payloads.
+
+        Each branch nests the type-specific result under a named key (`table` 
or `view`) so that
+        future composite types such as materialized views can carry multiple 
payloads without
+        field-name collisions (e.g. `view` + `storage-table`).
+      oneOf:
+        - $ref: '#/components/schemas/LoadTableRelationResult'
+        - $ref: '#/components/schemas/LoadViewRelationResult'
+      discriminator:
+        propertyName: object-type
+        mapping:
+          table: '#/components/schemas/LoadTableRelationResult'
+          view: '#/components/schemas/LoadViewRelationResult'
+
+    BatchLoadRelationsRequest:
+      type: object
+      required:
+        - identifiers
+      properties:
+        identifiers:
+          type: array
+          minItems: 1
+          items:
+            $ref: '#/components/schemas/BatchLoadRelationRequestItem'
+
+    BatchLoadRelationRequestItem:

Review Comment:
   At either this layer or the URL layer, would it make sense to honor the 
`referenced-by` parameter available to `loadTable` and `loadView`? 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to