daviddallakyan2005 commented on issue #3713: URL: https://github.com/apache/iceberg-python/issues/3713#issuecomment-5301623053
I audited remaining walrus `.get` truthiness checks after #3660 and #3745. The four shared helpers in `pyiceberg/utils/properties.py` still use `if value := properties.get(...)`, so an empty string is treated as missing: - `property_as_int` (line 33) - `property_as_float` (line 47) - `property_as_bool` (line 61) - `get_first_property_value` (line 74) I plan a first PR scoped to those helpers, matching the `is not None` pattern from #3660 / #3745 (and the same typed-conversion check already used in `Config.get_int` / `get_bool`): - key absent → keep returning the default - key present with `""` → treat as a value. For int/float/bool that raises `ValueError` (same as any other unparseable string). For `get_first_property_value`, return `""` instead of skipping to the next key. Other walrus `.get` sites (IO, catalog, table locations/metadata, `Config.get_default_catalog_name`) look like the same string-property class and would be follow-ups, not this PR. Schema-update / snapshot-ref / mapping lookups are object keyed and not this bug. -- 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]
