jx2lee commented on code in PR #3099:
URL: https://github.com/apache/iceberg-python/pull/3099#discussion_r2878425248


##########
pyiceberg/catalog/bigquery_metastore.py:
##########
@@ -405,6 +502,35 @@ def _create_table_parameters(self, metadata_file_location: 
str, table_metadata:
 
         return parameters
 
+    def _check_bigquery_commit_status(self, table_ref: TableReference, 
new_metadata_location: str) -> str:
+        try:
+            bq_table = self.client.get_table(table_ref)
+            parameters = (
+                bq_table.external_catalog_table_options.parameters
+                if bq_table.external_catalog_table_options and 
bq_table.external_catalog_table_options.parameters
+                else {}
+            )
+            current_metadata_location = parameters.get(METADATA_LOCATION_PROP)
+            if current_metadata_location == new_metadata_location:
+                return "SUCCESS"

Review Comment:
   Convert to Enum ! `BigqueryCommitStatus`



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