kevinjqliu commented on code in PR #1642: URL: https://github.com/apache/iceberg-python/pull/1642#discussion_r1951707200
########## pyiceberg/table/__init__.py: ########## @@ -1212,6 +1213,23 @@ def to_daft(self) -> daft.DataFrame: return daft.read_iceberg(self) + @staticmethod + def metadata_file_location(table_location: str, file_name: str, properties: Properties = EMPTY_DICT) -> str: + """Get the full path for a metadata file. + + Args: + table_location (str): The base table location + file_name (str): Name of the metadata file + properties (Properties): Table properties that may contain custom metadata path + + Returns: + str: Full path where the metadata file should be stored + """ + if metadata_path := properties.get(TableProperties.WRITE_METADATA_PATH): + return f"{metadata_path.rstrip("/")}/{file_name}" Review Comment: ```suggestion return f"{metadata_path.rstrip('/')}/{file_name}" ``` -- 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