moomindani opened a new pull request, #15559: URL: https://github.com/apache/iceberg/pull/15559
## Summary `ExpressionParser.toJson()` serializes `AlwaysTrue` and `AlwaysFalse` as literal JSON booleans (`true` / `false`), and `ExpressionParser.fromJson()` accepts them back. However, the `Expression` schema in the REST Catalog OpenAPI spec only lists object variants (`TrueExpression`, `FalseExpression`, etc.) in its `oneOf`. This means any JSON Schema validator generated from the spec incorrectly rejects valid REST payloads — for example, `ScanReport` messages where `"filter": true`. This PR adds `type: boolean` to `Expression.oneOf` to document the literal boolean form that Iceberg clients actually produce. The existing `TrueExpression` / `FalseExpression` object forms are preserved since they remain valid inputs to `ExpressionParser.fromJson()`. Root cause originally identified in #15072. ## Test plan - [x] No code change — the Java implementation (`ExpressionParser`) already handles literal booleans correctly, as verified by `TestExpressionParser#trueExpression` and `#falseExpression` - [x] The YAML spec change can be validated with any OpenAPI linter against the [Swagger/OpenAPI 3.0 spec](https://swagger.io/specification/) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
