rdblue commented on code in PR #17138:
URL: https://github.com/apache/iceberg/pull/17138#discussion_r3591090020


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -2606,7 +2630,205 @@ components:
         child:
           $ref: '#/components/schemas/Expression'
 
+    UnaryPredicate:
+      description: >
+        A predicate that tests a single value expression.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - child
+      properties:
+        type:
+          $ref: '#/components/schemas/ExpressionType'
+          enum: ["is-null", "not-null", "is-nan", "not-nan"]
+        child:
+          $ref: '#/components/schemas/ValueExpression'
+
+    ComparisonPredicate:
+      description: >
+        A predicate that compares two value expressions.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - left
+        - right
+      properties:
+        type:
+          $ref: '#/components/schemas/ExpressionType'
+          enum: ["lt", "lt-eq", "gt", "gt-eq", "eq", "not-eq", "starts-with", 
"not-starts-with"]
+        left:
+          $ref: '#/components/schemas/ValueExpression'
+        right:
+          $ref: '#/components/schemas/ValueExpression'
+
+    SetPredicate:
+      description: >
+        A predicate that operates on a list of literals.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - child
+        - values
+      properties:
+        type:
+          $ref: '#/components/schemas/ExpressionType'
+          enum: ["in", "not-in"]
+        child:
+          $ref: '#/components/schemas/ValueExpression'
+        values:
+          $ref: '#/components/schemas/Literals'
+
+    Literal:
+      description: >
+        A literal is either a bare value, an untyped literal object, or a
+        typed literal object.
+      oneOf:
+        - $ref: '#/components/schemas/PrimitiveTypeValue'
+        - type: object
+          additionalProperties: false
+          required:
+            - type
+            - value
+          properties:
+            type:
+              type: string
+              const: "literal"
+            value:
+              $ref: '#/components/schemas/PrimitiveTypeValue'
+            data-type:
+              $ref: '#/components/schemas/PrimitiveType'
+
+    Literals:
+      description: >
+        Literals is either a bare array of literals or a typed object with
+        an explicit data-type applied to all values.
+      oneOf:
+        - type: array
+          items:
+            $ref: '#/components/schemas/Literal'
+        - type: object
+          additionalProperties: false
+          required:
+            - type
+            - values
+            - data-type
+          properties:
+            type:
+              type: string
+              const: "literals"
+            values:
+              type: array
+              items:
+                $ref: '#/components/schemas/PrimitiveTypeValue'
+            data-type:
+              $ref: '#/components/schemas/PrimitiveType'
+
+    FieldReference:
+      description: >
+        A reference to a field. Either a bound reference (by field ID) or
+        an unbound reference (by name). The context in which an expression
+        is used determines which form is valid.
+      oneOf:
+        - $ref: '#/components/schemas/FieldReferenceById'
+        - $ref: '#/components/schemas/FieldReferenceByName'
+
+    FieldReferenceById:
+      description: A bound reference to a field by field ID.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - id
+      properties:
+        type:
+          type: string
+          const: "reference"
+        id:
+          type: integer
+
+    FieldReferenceByName:
+      description: An unbound reference to a field by name.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - name
+      properties:
+        type:
+          type: string
+          const: "reference"
+        name:
+          type: string
+
+    Apply:
+      description: >
+        A function application on zero or more value expressions or predicates.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - function
+        - arguments
+      properties:
+        type:
+          type: string
+          const: "apply"
+        function:
+          $ref: '#/components/schemas/FunctionReference'
+        arguments:
+          type: array
+          items:
+            anyOf:
+              - $ref: '#/components/schemas/ValueExpression'
+              - $ref: '#/components/schemas/Expression'
+
+    FunctionReference:
+      description: >
+        A function reference is either a name, a multi-part name, an
+        identifier object, or a catalog-qualified identifier object.
+      oneOf:
+        - type: string
+          minLength: 1
+        - type: array
+          minItems: 1
+          items:
+            type: string
+            minLength: 1
+        - type: object
+          additionalProperties: false
+          required:
+            - identifier
+          properties:
+            identifier:
+              type: array
+              minItems: 1
+              items:
+                type: string
+                minLength: 1
+        - type: object
+          additionalProperties: false
+          required:
+            - catalog
+            - identifier
+          properties:
+            catalog:
+              type: string
+            identifier:

Review Comment:
   Should this be `CatalogObjectIdentifier`?



##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -2606,7 +2630,205 @@ components:
         child:
           $ref: '#/components/schemas/Expression'
 
+    UnaryPredicate:
+      description: >
+        A predicate that tests a single value expression.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - child
+      properties:
+        type:
+          $ref: '#/components/schemas/ExpressionType'
+          enum: ["is-null", "not-null", "is-nan", "not-nan"]
+        child:
+          $ref: '#/components/schemas/ValueExpression'
+
+    ComparisonPredicate:
+      description: >
+        A predicate that compares two value expressions.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - left
+        - right
+      properties:
+        type:
+          $ref: '#/components/schemas/ExpressionType'
+          enum: ["lt", "lt-eq", "gt", "gt-eq", "eq", "not-eq", "starts-with", 
"not-starts-with"]
+        left:
+          $ref: '#/components/schemas/ValueExpression'
+        right:
+          $ref: '#/components/schemas/ValueExpression'
+
+    SetPredicate:
+      description: >
+        A predicate that operates on a list of literals.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - child
+        - values
+      properties:
+        type:
+          $ref: '#/components/schemas/ExpressionType'
+          enum: ["in", "not-in"]
+        child:
+          $ref: '#/components/schemas/ValueExpression'
+        values:
+          $ref: '#/components/schemas/Literals'
+
+    Literal:
+      description: >
+        A literal is either a bare value, an untyped literal object, or a
+        typed literal object.
+      oneOf:
+        - $ref: '#/components/schemas/PrimitiveTypeValue'
+        - type: object
+          additionalProperties: false
+          required:
+            - type
+            - value
+          properties:
+            type:
+              type: string
+              const: "literal"
+            value:
+              $ref: '#/components/schemas/PrimitiveTypeValue'
+            data-type:
+              $ref: '#/components/schemas/PrimitiveType'
+
+    Literals:
+      description: >
+        Literals is either a bare array of literals or a typed object with
+        an explicit data-type applied to all values.
+      oneOf:
+        - type: array
+          items:
+            $ref: '#/components/schemas/Literal'
+        - type: object
+          additionalProperties: false
+          required:
+            - type
+            - values
+            - data-type
+          properties:
+            type:
+              type: string
+              const: "literals"
+            values:
+              type: array
+              items:
+                $ref: '#/components/schemas/PrimitiveTypeValue'
+            data-type:
+              $ref: '#/components/schemas/PrimitiveType'
+
+    FieldReference:
+      description: >
+        A reference to a field. Either a bound reference (by field ID) or
+        an unbound reference (by name). The context in which an expression
+        is used determines which form is valid.
+      oneOf:
+        - $ref: '#/components/schemas/FieldReferenceById'
+        - $ref: '#/components/schemas/FieldReferenceByName'
+
+    FieldReferenceById:
+      description: A bound reference to a field by field ID.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - id
+      properties:
+        type:
+          type: string
+          const: "reference"
+        id:
+          type: integer
+
+    FieldReferenceByName:
+      description: An unbound reference to a field by name.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - name
+      properties:
+        type:
+          type: string
+          const: "reference"
+        name:
+          type: string
+
+    Apply:
+      description: >
+        A function application on zero or more value expressions or predicates.
+      type: object
+      additionalProperties: false
+      required:
+        - type
+        - function
+        - arguments
+      properties:
+        type:
+          type: string
+          const: "apply"
+        function:
+          $ref: '#/components/schemas/FunctionReference'
+        arguments:
+          type: array
+          items:
+            anyOf:
+              - $ref: '#/components/schemas/ValueExpression'
+              - $ref: '#/components/schemas/Expression'
+
+    FunctionReference:
+      description: >
+        A function reference is either a name, a multi-part name, an
+        identifier object, or a catalog-qualified identifier object.
+      oneOf:
+        - type: string
+          minLength: 1
+        - type: array
+          minItems: 1
+          items:
+            type: string
+            minLength: 1
+        - type: object
+          additionalProperties: false
+          required:
+            - identifier
+          properties:
+            identifier:

Review Comment:
   `CatalogObjectIdentifier`?



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