Fokko commented on code in PR #469: URL: https://github.com/apache/iceberg-python/pull/469#discussion_r1507412978
########## pyiceberg/types.py: ########## @@ -61,6 +62,14 @@ FIXED_PARSER = ParseNumberFromBrackets(FIXED) +def transform_dict_value_to_str(dict: Dict[str, Any]) -> Dict[str, str]: + """Transform all values in the dictionary to string. Raise an error if any value is None.""" + for value in dict.values(): + if value is None: + raise ValueError("None type is not a supported value in properties") Review Comment: I think it would help the user to show which key is `None`: ```suggestion for key, value in dict: if value is None: raise ValueError(f"None type is not a supported value in property: {key}") ``` -- 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