Skip to content

Commit 510d49d

Browse files
committed
fix(glue): Skip file existence check on S3 Tables commit path
The commit path also writes metadata via _write_metadata, which calls exists() (ListObjectsV2) before writing. S3 Tables managed storage does not support ListObjectsV2, so use the no-exist-check variant.
1 parent d3644b5 commit 510d49d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pyiceberg/catalog/glue.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,11 @@ def commit_table(
657657
if current_table and updated_staged_table.metadata == current_table.metadata:
658658
# no changes, do nothing
659659
return CommitTableResponse(metadata=current_table.metadata, metadata_location=current_table.metadata_location)
660-
self._write_metadata(
660+
# S3 Tables managed storage doesn't support ListObjectsV2, so skip the exist check.
661+
write_metadata = (
662+
self._write_metadata_no_exist_check if self._is_s3tables_database(database_name) else self._write_metadata
663+
)
664+
write_metadata(
661665
metadata=updated_staged_table.metadata,
662666
io=updated_staged_table.io,
663667
metadata_path=updated_staged_table.metadata_location,

0 commit comments

Comments
 (0)