paulcichonski commented on issue #1431:
URL: 
https://github.com/apache/iceberg-python/issues/1431#issuecomment-2543363646

   This might be a simple fix, but I"m not exactly sure why the constructor is 
structured like it is, so not positive if it breaks some other usage pattern 
for `NestedField`:
   
   ```diff
   diff --git a/pyiceberg/types.py b/pyiceberg/types.py
   index 8fa7453..0a8c5e6 100644
   --- a/pyiceberg/types.py
   +++ b/pyiceberg/types.py
   @@ -328,8 +328,8 @@ class NestedField(IcebergType):
            data["type"] = data["type"] if "type" in data else field_type
            data["required"] = required
            data["doc"] = doc
   -        data["initial-default"] = initial_default
   -        data["write-default"] = write_default
   +        data["initial-default"] = data['initial-default'] if 
'initial-default' in data else initial_default
   +        data["write-default"] = data['write-default'] if 'write-default' in 
data else write_default
            super().__init__(**data)
    
        def __str__(self) -> str:
   ```
   
   But if that seems good, let me know and I can PR it with tests. 


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to