daviddallakyan2005 opened a new pull request, #3801:
URL: https://github.com/apache/iceberg-python/pull/3801

   <!--
   Thanks for opening a pull request!
   -->
   
   Closes #3713
   
   # Rationale for this change
   
   `property_as_int`, `property_as_float`, `property_as_bool`, and 
`get_first_property_value` used a truthy walrus check (`if value := 
properties.get(...)`). An empty string is falsy in Python, so a present `""` 
was treated as a missing key: the typed helpers returned the default instead of 
parsing, and `get_first_property_value` skipped to the next name.
   
   This is the same class of bug as #3660 (falsy `0` collapsed to unset) and 
#3745 (CLI property lookup reported `""` as missing). The helpers now use `is 
not None`, matching those PRs and the typed getters already in `Config.get_int` 
/ `get_bool`. A missing key still returns the default. A present empty string 
is a value: int/float/bool raise `ValueError` (same as any other unparseable 
string), and `get_first_property_value` returns `""`.
   
   Other walrus `.get` sites (IO, catalog, table locations/metadata) are left 
for follow-ups.
   
   ## Are these changes tested?
   
   Yes. Regression tests pass `""` for int, float, and bool properties and for 
`get_first_property_value`.
   
   - `make lint`
   - `make test` → 3933 passed, 3 skipped, 1569 deselected
   
   ## Are there any user-facing changes?
   
   Yes. An explicitly empty int/float/bool property now raises `ValueError` 
instead of silently using the default, and `get_first_property_value` no longer 
skips an empty string. Changelog label requested.
   
   


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

Reply via email to