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

   Closes #3167
   
   # Rationale for this change
   
   The rest spec model `GetNamespaceResponse` defines the `properties` field as 
optional, and nullable. Also, following the description if the API doesn't 
support ns properties they should return null.
   
   Link: 
https://github.com/apache/iceberg/blob/0a73da119ff38ee3a98f248b42180caa51001cec/open-api/rest-catalog-open-api.yaml#L4146-L4163
   
   ```yaml
       GetNamespaceResponse:
         type: object
         required:
           - namespace
         properties:
           namespace:
             $ref: '#/components/schemas/Namespace'
           properties:
             type: object
             description:
               Properties stored on the namespace, if supported by the server.
               If the server does not support namespace properties, it should 
return null for this field.
               If namespace properties are supported, but none are set, it 
should return an empty object.
             additionalProperties:
               type: string
             example: { "owner": "Ralph", 'transient_lastDdlTime': '1452120468' 
}
             default: { }
             nullable: true
    ```
   
   Looks like the pydantic models raise a `ValidationError` in the 
optional/null cases as seen in the issue above. So this PR adds a fix to handle 
these cases.
   
   ## Are these changes tested?
   
   Yes, added tests and tested with s3tables api 
   
   ## Are there any user-facing changes?
   
   Not really
   


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