This is an automated email from the ASF dual-hosted git repository. lzljs3620320 pushed a commit to branch release-1.3 in repository https://gitbox.apache.org/repos/asf/paimon.git
commit 47c521d3a7df941c5d0bcc1ee374a3e3d539af4e Author: JingsongLi <[email protected]> AuthorDate: Wed Nov 5 16:03:42 2025 +0800 [Python] Rename to BATCH_COMMIT_IDENTIFIER in snapshot.py --- paimon-python/pypaimon/snapshot/snapshot.py | 2 +- paimon-python/pypaimon/write/table_commit.py | 8 ++++---- paimon-python/pypaimon/write/table_write.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/paimon-python/pypaimon/snapshot/snapshot.py b/paimon-python/pypaimon/snapshot/snapshot.py index f164f5eb61..d5f72dedcf 100644 --- a/paimon-python/pypaimon/snapshot/snapshot.py +++ b/paimon-python/pypaimon/snapshot/snapshot.py @@ -21,7 +21,7 @@ from typing import Dict, Optional from pypaimon.common.json_util import json_field -COMMIT_IDENTIFIER = 0x7fffffffffffffff +BATCH_COMMIT_IDENTIFIER = 0x7fffffffffffffff @dataclass diff --git a/paimon-python/pypaimon/write/table_commit.py b/paimon-python/pypaimon/write/table_commit.py index 0dcfabf99e..eab7606128 100644 --- a/paimon-python/pypaimon/write/table_commit.py +++ b/paimon-python/pypaimon/write/table_commit.py @@ -18,7 +18,7 @@ from typing import List, Optional -from pypaimon.snapshot.snapshot import COMMIT_IDENTIFIER +from pypaimon.snapshot.snapshot import BATCH_COMMIT_IDENTIFIER from pypaimon.write.commit_message import CommitMessage from pypaimon.write.file_store_commit import FileStoreCommit @@ -41,7 +41,7 @@ class TableCommit: self.file_store_commit = FileStoreCommit(snapshot_commit, table, commit_user) self.batch_committed = False - def _commit(self, commit_messages: List[CommitMessage], commit_identifier: int = COMMIT_IDENTIFIER): + def _commit(self, commit_messages: List[CommitMessage], commit_identifier: int = BATCH_COMMIT_IDENTIFIER): self._check_committed() non_empty_messages = [msg for msg in commit_messages if not msg.is_empty()] @@ -78,10 +78,10 @@ class TableCommit: class BatchTableCommit(TableCommit): def commit(self, commit_messages: List[CommitMessage]): - self._commit(commit_messages, COMMIT_IDENTIFIER) + self._commit(commit_messages, BATCH_COMMIT_IDENTIFIER) class StreamTableCommit(TableCommit): - def commit(self, commit_messages: List[CommitMessage], commit_identifier: int = COMMIT_IDENTIFIER): + def commit(self, commit_messages: List[CommitMessage], commit_identifier: int = BATCH_COMMIT_IDENTIFIER): self._commit(commit_messages, commit_identifier) diff --git a/paimon-python/pypaimon/write/table_write.py b/paimon-python/pypaimon/write/table_write.py index 3ccc078223..7f415a0ba7 100644 --- a/paimon-python/pypaimon/write/table_write.py +++ b/paimon-python/pypaimon/write/table_write.py @@ -21,7 +21,7 @@ from typing import List import pyarrow as pa from pypaimon.schema.data_types import PyarrowFieldParser -from pypaimon.snapshot.snapshot import COMMIT_IDENTIFIER +from pypaimon.snapshot.snapshot import BATCH_COMMIT_IDENTIFIER from pypaimon.write.commit_message import CommitMessage from pypaimon.write.file_store_write import FileStoreWrite @@ -87,10 +87,10 @@ class BatchTableWrite(TableWrite): if self.batch_committed: raise RuntimeError("BatchTableWrite only supports one-time committing.") self.batch_committed = True - return self.file_store_write.prepare_commit(COMMIT_IDENTIFIER) + return self.file_store_write.prepare_commit(BATCH_COMMIT_IDENTIFIER) class StreamTableWrite(TableWrite): - def prepare_commit(self, commit_identifier: int = COMMIT_IDENTIFIER) -> List[CommitMessage]: + def prepare_commit(self, commit_identifier) -> List[CommitMessage]: return self.file_store_write.prepare_commit(commit_identifier)
