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


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -2606,7 +2630,194 @@ components:
         child:
           $ref: '#/components/schemas/Expression'
 
+    UnaryPredicate:
+      description: >
+        A predicate that tests a single value expression. Replaces the 
deprecated
+        UnaryExpression that used 'term'.
+      type: object
+      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. Replaces the 
deprecated
+        LiteralExpression that used 'term' and 'value'.
+      type: object
+      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 tests whether a value expression is in a set of 
literals.
+        Replaces the deprecated SetExpression that used 'term'.
+      type: object
+      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 value expression per Iceberg Expressions spec, Appendix B.
+        Three JSON forms are accepted: a bare scalar value, a typed literal
+        object without a data-type, or a typed literal object with an
+        explicit data-type.
+      oneOf:
+        - type: string
+        - type: number
+        - type: integer
+        - type: boolean
+        - type: 'null'
+        - type: object
+          required:
+            - type
+            - value
+          properties:
+            type:
+              type: string
+              const: "literal"
+            value:
+              $ref: '#/components/schemas/PrimitiveTypeValue'
+            data-type:
+              $ref: '#/components/schemas/PrimitiveType'
+
+    Literals:
+      description: >
+        A set of literal values per Iceberg Expressions spec, Appendix B.
+        Two JSON forms: 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
+          required:
+            - type
+            - values
+          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 per Iceberg Expressions spec, Appendix B.
+        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:
+        - type: object
+          required:
+            - type
+            - id
+          properties:
+            type:
+              type: string
+              const: "reference"
+            id:
+              type: integer
+        - type: object
+          required:
+            - type
+            - name
+          properties:
+            type:
+              type: string
+              const: "reference"
+            name:
+              type: string
+
+    Apply:
+      description: >
+        A function application per Iceberg Expressions spec, Appendix B.
+        Represents the result of calling a function on zero or more value
+        expressions or predicates.
+      type: object
+      required:
+        - type
+        - function
+        - arguments
+      properties:
+        type:
+          type: string
+          const: "apply"
+        function:
+          $ref: '#/components/schemas/FunctionReference'
+        arguments:

Review Comment:
   LGTM. withdrawn. this looks correct.



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