feefs opened a new issue, #15072:
URL: https://github.com/apache/iceberg/issues/15072

   ### Apache Iceberg version
   
   1.10.1 (latest release)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   I noticed the `ScanReport` schema in the OpenAPI spec has [`filter: $ref: 
'#components/schemas/Expression'` 
property](https://github.com/apache/iceberg/blob/e93eaab330581999d8fd8e4e6f5f885446cf28c3/open-api/rest-catalog-open-api.yaml#L3969-L3970),
 but my Spark 4 + Iceberg 1.10.1 client sometimes sends `ScanReport` payloads 
to the [Metrics 
Reporting](https://iceberg.apache.org/docs/latest/metrics-reporting/) endpoint 
with `{ "filter": true }` (literal boolean).
   
   The problem I'm encountering is that the `Expression` schema [allows the 
`TrueExpression` or `FalseExpression` 
schemas](https://github.com/apache/iceberg/blob/e93eaab330581999d8fd8e4e6f5f885446cf28c3/open-api/rest-catalog-open-api.yaml#L2306-L2309),
 but not literal booleans. I'm generating a JSON Schema validator from the 
OpenAPI spec, and it's incorrectly rejecting `ScanReport` payloads such as `{ 
"filter": true }`.
   
   I traced the code and found #5705, where the [tests for 
`TestScanReportParser`](https://github.com/apache/iceberg/pull/5705/changes#diff-31983148600c3f78b9628dc4d00e7928097ccb691788e1ae787f9e5870310712)
 show `\"true\"` being changed to `true` to reflect what Iceberg clients 
actually send. @nastra since you implemented that PR and many related changes, 
do you have any input on this?
   
   ### Willingness to contribute
   
   - [x] I can contribute a fix for this bug independently
   - [x] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


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