Fokko commented on PR #4858:
URL: https://github.com/apache/iceberg/pull/4858#issuecomment-1140487797

   Alright, did some more in-depth investigation over the weekend by just 
converting everything to the generated models. It went quite well and it works 
quite nicely with the encoders/decoders. We're able to export the schema from 
our subclassed types by taking the parent schema of the pydantic model, which 
is quite cool. 
   
   But hit a wall now. At the top we have the `Type`:
   
   
https://github.com/apache/iceberg/blob/f5de18f554711b4ae00d6ebefbaa126a7f83f792/open-api/rest-catalog-open-api.yaml#L940-L945
   
   With the generated models, we're unable to construct the type hierarchy 
because the `PrimitiveType` is a plain `string`, and the other ones are of type 
`object` 😭 The combination of Pydantic and subclassing isn't able to cope with 
this. One way would be to change the PrimitiveType also to an `object` (and 
also add a `type` field to determine the type). This would also allow us to add 
properties for the Fixed and Decimal instead of having to parse them from the 
name.


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