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


##########
pyiceberg/io/__init__.py:
##########
@@ -320,6 +331,13 @@ def _infer_file_io_from_scheme(path: str, properties: 
Properties) -> Optional[Fi
     return None
 
 
+def _get_first_property_value(properties: Properties, property_names: 
Tuple[str, ...]) -> Optional[Any]:

Review Comment:
   Nit: Duplicate function defined here and in pyiceberg/catalog/__init__.py 
could be consolidated to one



##########
pyiceberg/catalog/__init__.py:
##########
@@ -838,6 +855,18 @@ def _get_default_warehouse_location(self, database_name: 
str, table_name: str) -
 
         raise ValueError("No default path is set, please specify a location 
when creating a table")
 
+    def _get_first_property_value(self, property_names: Tuple[str, ...]) -> 
Optional[Any]:
+        for property_name in property_names:
+            if property_value := self.properties.get(property_name):
+                if property_name in DEPRECATED_PROPERTY_NAMES:
+                    deprecated(
+                        deprecated_in="0.7.0",
+                        removed_in="0.8.0",
+                        help_message=f"The property {property_name} is 
deprecated. Please use properties start with aws., glue., and dynamo. instead",

Review Comment:
   ```suggestion
                           help_message=f"The property {property_name} is 
deprecated. Please use properties that start with aws., glue., and dynamo. 
instead",
   ```



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