Skip to content

Commit 7562860

Browse files
kevinjqliuCopilot
andauthored
Clarify comments on lock request operation type
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 641c7ec commit 7562860

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎pyiceberg/catalog/hive.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ def load_view(self, identifier: str | Identifier) -> View:
507507
raise NotImplementedError
508508

509509
def _create_lock_request(self, database_name: str, table_name: str) -> LockRequest:
510-
# Iceberg commits do not open a metastore transaction, so the lock is marked NO_TXN. Setting it explicitly
511-
# also matters for Hive 2.1, which rejects a lock component left at the default UNSET operation type.
510+
# Iceberg commits are not executed within a Hive transaction, so the lock component uses operationType=NO_TXN.
511+
# Setting it explicitly also matters for Hive 2.1, which rejects a lock component left at the default UNSET operation type.
512512
lock_component: LockComponent = LockComponent(
513513
level=LockLevel.TABLE,
514514
type=LockType.EXCLUSIVE,

0 commit comments

Comments
 (0)