rdblue commented on code in PR #17138:
URL: https://github.com/apache/iceberg/pull/17138#discussion_r3591029664
##########
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:
Review Comment:
Is it possible to combine this with the now-deprecated `SetExpression` to
avoid more changes?
The main difference is that this uses `child` instead of `term`. But this
could include `term` as a field with documentation that it should not be
produced rather than replacing and deprecating all of `SetExpression`.
Similarly, `SetExpression` had a `values` field that is now of type
`Literals`. `Literals` could be an array of `Literal` and `Literal` could be a
`PrimitiveTypeValue`. That means the `Literals` definition used here is a
superset of what was possible before. If we can solve the problem of allowing
`term` here then we don't need to have two (this one and a deprecated version).
We can just have this one.
The last issue is that naming may be a problem, but I think that we could
also continue using `SetExpression` if it isn't deprecated.
--
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]