kevinjqliu commented on code in PR #1433:
URL: https://github.com/apache/iceberg-python/pull/1433#discussion_r1906456170


##########
mkdocs/docs/api.md:
##########
@@ -961,20 +963,21 @@ Renaming a field in an Iceberg table is simple:
 ```python
 with table.update_schema() as update:
     update.rename_column("retries", "num_retries")
-    # This will rename `confirmed_by` to `exchange`
-    update.rename_column("properties.confirmed_by", "exchange")
+    # This will rename `confirmed_by` to `processed_by` in the `details` struct
+    update.rename_column(("details", "confirmed_by"), ("detail", 
"processed_by"))

Review Comment:
   this example doesnt work
   
   ```
   Traceback (most recent call last):
     File "<stdin>", line 2, in <module>
     File 
"/Users/kevinliu/repos/iceberg-python/pyiceberg/table/update/schema.py", line 
278, in rename_column
       self._updates[field_from.field_id] = NestedField(
                                            ^^^^^^^^^^^^
     File "/Users/kevinliu/repos/iceberg-python/pyiceberg/types.py", line 333, 
in __init__
       super().__init__(**data)
     File 
"/Users/kevinliu/Library/Caches/pypoetry/virtualenvs/pyiceberg-Is5Rt7Ah-py3.12/lib/python3.12/site-packages/pydantic/main.py",
 line 214, in __init__
       validated_self = self.__pydantic_validator__.validate_python(data, 
self_instance=self)
                        
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   pydantic_core._pydantic_core.ValidationError: 1 validation error for 
NestedField
   name
     Input should be a valid string [type=string_type, input_value=('detail', 
'processed_by'), input_type=tuple]
       For further information visit 
https://errors.pydantic.dev/2.10/v/string_type
   ```



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