Skip to content

feat: support transaction properties and commit messages in writes - #5308

Open
Gallardot wants to merge 3 commits into
lance-format:mainfrom
Gallardot:feat/write-transaction-metadata
Open

Gallardot wants to merge 3 commits into
lance-format:mainfrom
Gallardot:feat/write-transaction-metadata

Conversation

@Gallardot

Copy link
Copy Markdown
Contributor

Summary

Add transaction_properties and commit_message to write_lance, LanceDatasink, and LanceFragmentCommitter, matching the semantics of PyLance's write_dataset().

The metadata is included in the native Lance transaction when committing the written fragments. An explicit commit_message takes precedence over __lance_commit_message in the properties, including an empty string.The caller's dictionary is not modified.

All three write modes are supported. Streaming writes attach the same metadata to each committed batch. Existing behavior is preserved when both parameters are omitted.

Validation

  • Compare persisted transaction properties against lance.write_dataset()
    across write modes and streaming configurations.
  • Cover message precedence, empty values, Unicode, invalid inputs,
    independent transaction history, direct datasinks, and namespace writes.
  • Read/write and fragment tests: 125 passed.
  • Ruff, formatting, and strict mypy checks passed.
  • Validated with PyLance 12.0.0 and Ray 2.58.0.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support transaction_properties and commit_message in write_lance

1 participant