amogh-jahagirdar commented on code in PR #9695:
URL: https://github.com/apache/iceberg/pull/9695#discussion_r1683757259


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -3647,6 +3786,173 @@ components:
             type: integer
           description: "List of equality field IDs"
 
+    PreplanTableRequest:
+      type: object
+      required:
+        - table-scan-context
+      properties:
+        table-scan-context:
+          $ref: '#/components/schemas/TableScanContext'
+
+    PlanTableRequest:
+      type: object
+      required:
+        - table-scan-context
+      properties:
+        table-scan-context:
+          $ref: '#/components/schemas/TableScanContext'
+        plan-task:
+          $ref: '#/components/schemas/PlanTask'
+        stats-fields:
+          description:
+            A list of fields that the client requests the server to send 
statistics
+            in each `FileScanTask` returned in the response
+          type: array
+          items:
+            $ref: '#/components/schemas/FieldName'
+
+    TableScanContext:
+      anyOf:

Review Comment:
   I see, I think it's actually quite the same case but I think technically 
`TableUpdate` may need to be `oneOf` since those refs are mutually exclusive. I 
missed the discriminator notation, so that also makes the different types 
mutually exclusive, at least logically it's the same spec. But the example in 
https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism/ 
shows `oneOf` as well when there's a discriminator.
   
   I think this may be a case where it should be `oneOf` on a technicality but 
to a spec reader and a client it's still fairly clear due to the discriminator 
usage, so arguably not worth going through a whole spec change since it doesn't 
really add much value. I'm fine as it is.
   
   cc @nastra @rdblue @danielcweeks in case they had any opinions on this



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to