rahil-c commented on code in PR #9695:
URL: https://github.com/apache/iceberg/pull/9695#discussion_r1546861228

##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -2838,6 +2991,76 @@ components:
           additionalProperties:
             type: string
 
+    PreplanTableRequest:
+      type: object
+      required:
+        - select
+        - filter
+      properties:
+        select:
+          description: A list of the selected column names
+          type: array
+          items:
+            type: string
+        filter:
+          $ref: '#/components/schemas/Expression'
+        case-sensitive:
+          description: Indicates whether column selection and filtering should 
be case sensitive
+          type: boolean
+          default: true
+        snapshot-id:
+          description: an int64 snapshot ID (if snapshot-range is not 
present); optional and defaults to the table's current snapshot
+          type: integer
+          format: int64
+        snapshot-range:
+          description: A JSON list containing exactly 2 snapshot IDs 
representing the start (exclusive) and end (inclusive) snapshots. This option 
is not allowed when `snapshot-id` is present in the request.
+          type: array
+          items:
+            type: integer
+            format: int64
+      oneOf:
+        - required: [snapshot-id]

Review Comment:
   I think your right, i basically wanted to express that user can only set 
`snapshot-id` or `snapshot-range` but not both. 
   
   I found this 
https://stackoverflow.com/questions/21134029/how-to-define-mutually-exclusive-query-parameters-in-swagger-openapi
 but it seems that mutually exclusive properties in request body is not 
straight foward and that we may have to just rely on the descriptions of the 
fields to tell the user to only pass one of these but not both.
   
   Will fix this.



##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -2838,6 +2991,76 @@ components:
           additionalProperties:
             type: string
 
+    PreplanTableRequest:
+      type: object
+      required:
+        - select
+        - filter
+      properties:
+        select:
+          description: A list of the selected column names
+          type: array
+          items:
+            type: string
+        filter:
+          $ref: '#/components/schemas/Expression'
+        case-sensitive:
+          description: Indicates whether column selection and filtering should 
be case sensitive
+          type: boolean
+          default: true
+        snapshot-id:
+          description: an int64 snapshot ID (if snapshot-range is not 
present); optional and defaults to the table's current snapshot
+          type: integer
+          format: int64
+        snapshot-range:
+          description: A JSON list containing exactly 2 snapshot IDs 
representing the start (exclusive) and end (inclusive) snapshots. This option 
is not allowed when `snapshot-id` is present in the request.
+          type: array
+          items:
+            type: integer
+            format: int64
+      oneOf:
+        - required: [snapshot-id]
+        - required: [snapshot-range]
+
+    PlanTableRequest:
+      type: object
+      required:
+        - select
+      properties:
+        select:
+          description: A list of the selected column names
+          type: array
+          items:
+            type: string
+        filter:
+          $ref: '#/components/schemas/Expression'
+        case-sensitive:
+          description: Indicates whether column selection and filtering should 
be case sensitive
+          type: boolean
+          default: true
+        stats-fields:
+          description: A list of string field names for which stats should be 
included
+          type: array
+          items:
+            type: string
+        plan-task:
+          $ref: '#/components/schemas/PlanTask'
+        snapshot-id:
+          description: an int64 snapshot ID (if snapshot-range is not 
present); optional and defaults to the table's current snapshot. This option is 
not allowed when 'plan-task` is present in the request.
+          type: integer
+          format: int64
+
+        snapshot-range:
+          description: A JSON list containing exactly 2 snapshot IDs 
representing the start (exclusive) and end (inclusive) snapshots. This option 
is not allowed when `snapshot-id` or `plan-task` is present in the request.
+          type: array
+          items:
+            type: integer
+            format: int64
+      oneOf:
+        - required: [plan-task]

Review Comment:
   similar to what i wrote here 
https://github.com/apache/iceberg/pull/9695#discussion_r1546861228, will fix 
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