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


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -2604,63 +2619,216 @@ components:
           $ref: '#/components/schemas/ExpressionType'
           const: "not"
         child:
-          $ref: '#/components/schemas/Expression'
+          $ref: '#/components/schemas/Predicate'
 
-    UnaryExpression:
+    UnaryPredicate:
+      description: >
+        A predicate that tests a single value expression. Accepts either
+        'child' (preferred) or 'term' (deprecated) to identify the operand.
       type: object
+      additionalProperties: false
       required:
         - type
-        - term
       properties:
         type:
           $ref: '#/components/schemas/ExpressionType'
           enum: ["is-null", "not-null", "is-nan", "not-nan"]
+        child:
+          $ref: '#/components/schemas/ValueExpression'
         term:
+          deprecated: true
+          description: "Deprecated. Use 'child' instead."
           $ref: '#/components/schemas/Term'
 
-    LiteralExpression:
+    ComparisonPredicate:
+      description: >
+        A predicate that compares two value expressions. Accepts either
+        'left'/'right' (preferred) or 'term'/'value' (deprecated).
       type: object
+      additionalProperties: false
       required:

Review Comment:
   I don't think that this needs to enforce all requirements structurally. This 
already states that using "left" and "right" is preferred and "term" and 
"value" are deprecated. If you send "left" but not "right" then that's going to 
be an error -- and an obvious one for both producers and consumers.
   
   The alternative to split this into 3 types (deprecated, current, and a 
union) is a lot larger and doesn't help make this substantially more clear. I 
doubt people are going to have trouble understanding that "left" and "right" go 
together.



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