You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "kevinjqliu (via GitHub)" <gi...@apache.org> on 2026/07/26 16:09:04 UTC

[I] check codebase for python truthiness error [iceberg-python]

kevinjqliu opened a new issue, #3713:
URL: https://github.com/apache/iceberg-python/issues/3713

   As seen in https://github.com/apache/iceberg-python/pull/3660
   and for walrus operation (https://github.com/apache/iceberg-python/pull/3412)
   


-- 
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-unsubscribe@iceberg.apache.org.apache.org

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


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


Re: [I] check codebase for python truthiness error [iceberg-python]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #3713:
URL: https://github.com/apache/iceberg-python/issues/3713#issuecomment-5168776854

   we should verify every instance of using walrus with `.get`, ie
   ```
   if property_value := namespace_properties.get(property_name):
   ```
   
   https://grep.app/search?f.repo=apache%2Ficeberg-python&f.repo.pattern=iceberg-python&regexp=true&q=%3A.*.get%5C%28


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] check codebase for python truthiness error [iceberg-python]

Posted by "mj006648 (via GitHub)" <gi...@apache.org>.
mj006648 commented on issue #3713:
URL: https://github.com/apache/iceberg-python/issues/3713#issuecomment-5162185519

   I found one remaining truthiness case in the CLI property lookup. Both `properties get namespace` and `properties get table` use a truthy check on `dict.get()`, so a stored empty string is reported as missing even though the property key exists.
   
   I can send a small PR that switches both lookups to an explicit `None` check and adds CLI regression tests for empty table and namespace property values, if that scope fits this issue.
   


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] check codebase for python truthiness error [iceberg-python]

Posted by "daviddallakyan2005 (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@iceberg.apache.org

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


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