Skip to content

[python] Honor snapshot.ignore-empty-commit for empty appends - #9878

Open
YannByron wants to merge 1 commit into
apache:masterfrom
YannByron:codex/python-empty-append-snapshots
Open

YannByron wants to merge 1 commit into
apache:masterfrom
YannByron:codex/python-empty-append-snapshots

Conversation

@YannByron

Copy link
Copy Markdown
Contributor

Purpose

PyPaimon skips an append commit with no committables even when snapshot.ignore-empty-commit=false. A newly created empty table therefore has no snapshot and cannot be tagged, preventing applications from pinning an empty component alongside populated tables.

Honor the existing option for Python append commits. The default still skips empty appends; explicitly setting it to false creates a normal snapshot that can be tagged and read. No-op overwrite/drop behavior is unchanged.

Tests

  • Added a real-table regression covering default skipping, an explicit empty snapshot and tag, schema/properties readback, later appends, and an empty commit that preserves existing rows and the old empty tag.
  • 62 tests passed across table_commit_test.py, file_store_commit_test.py, write/commit_callback_test.py, overwrite_commit_conflict_test.py, and overwrite_changes_cache_test.py (Python 3.13, PyArrow 19.0.1).
  • Flake8 with the repository configuration and git diff --check passed.

Honor snapshot.ignore-empty-commit=false so an empty table can be
versioned with a tag. Preserve default empty-append skipping and
no-op overwrite/drop behavior.

Validation: real empty-tag readback and commit/callback/overwrite tests.

Co-Authored-By: Codex <noreply@anthropic.com>
AI-Model: gpt-6
Co-Authored-By: Codex <noreply@ai-tool.com>
AI-Contributed/Feature: 32/32
AI-Contributed/UT: 47/47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant