samredai commented on issue #4631:
URL: https://github.com/apache/iceberg/issues/4631#issuecomment-1113632408

   Hey @dramaticlly, we all discussed this in the python community sync this 
past Wednesday. The decision was to go with the builder pattern (a 
`PartitionSpecBuilder` class) here but to make an attempt to consider the 
option to directly instantiate a spec using the `PartitionSpec` init method. In 
Java that class is protected and so you are forced to go through the builder 
pattern, but it may turn out feasible to allow more flexibility in the python 
client.
   
   A consideration to keep in mind is that someone directly instantiating a 
`PartitionSpec` won't have any checks or other logic that the builder offers. 
As the builder grows in complexity, I'd imagine the option to directly 
instantiate a `PartitionSpec` becomes less feasible (we wouldn't want to 
duplicate the builder logic in an overly complex init method for 
`PartitionSpec`).
   
   Let's keep this issue open and as you work on this, feel free to comment 
here with anything you find that may require reconsidering all of this.


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