geruh opened a new pull request, #14657:
URL: https://github.com/apache/iceberg/pull/14657

   ## Summary
   
   This PR fixes the parser to accept the correct JSON object format per the 
[OpenAPI 
specification](https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml#L4486-L4489).
 While working on integrating server-side scanning in PyIceberg, I noticed that 
the `filter` field in `PlanTableScanRequest` was expecting a string 
representation of the expression rather than the Expression object defined in 
the OpenAPI spec.
   
   For instance, to get a scan to work today, we need to supply the filter as a 
string:
   
   ```
   {
       "snapshot-id": 2540284336700708540,
       "filter": "{\"type\":\"lt-eq\",\"term\":\"id\",\"value\":200000}",
       "case-sensitive": true
   }
   ```
   
   But this throws an error:
   
   ```
   {
       "snapshot-id": 2540284336700708540,
       "filter": {
           "type": "lt-eq",
           "term": "id",
           "value": 200000
       },
       "case-sensitive": true
   }
   ```
   
   Error:
   
   ```
   java.lang.IllegalArgumentException: argument "content" is null
   ```
   
   ## Testing 
   
   Updated existing tests and added new tests to validte filter expressions 
serialize/deserialize correctly as JSON objects.
   
   cc: @singhpk234 @amogh-jahagirdar 


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