kevinjqliu opened a new pull request, #504: URL: https://github.com/apache/iceberg-python/pull/504
Requires #503 to be merged first. This PR modifies `Transaction`'s `set_properties` API to accept table properties as type `Dict[str, Any]`, either as dictionary or kwargs. For example, ``` with table.transaction() as transaction: transaction.set_properties(abc=123) transaction.set_properties({"abc": 123}) ``` This is done by reusing the field validator defined in #469. Setting `None` property value is disallowed since the transformation will change None to str "None" which is unintuitive. The Iceberg spec stores table properties as strings. That is why when setting a property value as int, reading it back produces a string. ``` table = table.transaction().set_properties({"abc": 123}).commit_transaction() assert table.properties == dict({"abc": "123"}, **DEFAULT_PROPERTIES) ``` -- 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