You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "JingsongLi (via GitHub)" <gi...@apache.org> on 2026/07/01 05:21:33 UTC
Re: [PR] [python] Extend commit protocol for compaction (DataIncrement/CompactIncrement) [paimon]
JingsongLi commented on code in PR #7873:
URL: https://github.com/apache/paimon/pull/7873#discussion_r3503453708
##########
paimon-python/pypaimon/write/file_store_commit.py:
##########
@@ -114,10 +114,22 @@ def __init__(self, snapshot_commit: SnapshotCommit, table, commit_user: str,
self.rollback = CommitRollback(table_rollback) if table_rollback is not None else None
def commit(self, commit_messages: List[CommitMessage], commit_identifier: int):
- """Commit the given commit messages in normal append mode."""
+ """Commit write-side messages (data_increment only).
+
+ Compaction results (compact_before / compact_after) must be committed
+ through commit_compact() instead — they produce a separate snapshot kind
+ and skip row-id assignment.
+ """
if not commit_messages:
return
+ for msg in commit_messages:
+ if not msg.compact_increment.is_empty():
+ raise ValueError(
+ "commit() rejects messages carrying compact_increment; "
+ "use commit_compact() for compaction results."
Review Comment:
This new path is not reachable through the public table commit API yet. `WriteBuilder.new_commit()` returns `BatchTableCommit` / `StreamTableCommit`, and both `commit()` implementations still delegate to `FileStoreCommit.commit(...)`; with this guard, any caller that receives a `CommitMessage` carrying `compact_increment` through the normal writer/driver flow will just get this `ValueError`. Please expose a matching `commit_compact(...)` on `BatchTableCommit` and `StreamTableCommit` (or make the public `commit()` dispatch compact-only messages to `FileStoreCommit.commit_compact`) so the new compact protocol can actually be committed without reaching into `table_commit.file_store_commit` internals.
--
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-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org