syun64 commented on code in PR #922:
URL: https://github.com/apache/iceberg-python/pull/922#discussion_r1681934924


##########
pyiceberg/table/__init__.py:
##########
@@ -254,6 +254,13 @@ def property_as_bool(properties: Dict[str, str], 
property_name: str, default: bo
             return value.lower() == "true"
         return default
 
+    @staticmethod
+    def get_first_property_value(properties: Properties, *property_names: str) 
-> Optional[Any]:
+        for property_name in property_names:
+            if property_value := properties.get(property_name):
+                return property_value
+        return None
+

Review Comment:
   Agreed. We can probably reorganize many of our functions to avoid circular 
dependencies 🙂 



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