Skip to content

fix(python): python binding of Compaction.commit#7210

Open
gstamatakis95 wants to merge 1 commit into
lance-format:mainfrom
gstamatakis95:fix/compaction-commit-options
Open

fix(python): python binding of Compaction.commit#7210
gstamatakis95 wants to merge 1 commit into
lance-format:mainfrom
gstamatakis95:fix/compaction-commit-options

Conversation

@gstamatakis95

Copy link
Copy Markdown
Contributor

Closes #7209

  • python/src/dataset/optimize.rs: Compaction.commit gains an optional options dict
    parameter (#[pyo3(signature = (dataset, rewrites, options = None))]), parsed through the same
    parse_compaction_options helper that plan and execute already use, seeded from the
    dataset's manifest.config exactly like execute. Absent or None preserves the old behavior.
    The TODO comment is removed.
  • python/python/lance/lance/optimize.pyi: stub updated to
    commit(dataset, rewrites, options: Optional[CompactionOptions] = None).
  • python/python/tests/test_optimize.py: new parametrized test
    test_defer_index_remap_via_commit_options. With
    Compaction.commit(dataset, rewrites, options={"defer_index_remap": True}) a
    __lance_frag_reuse system index appears in describe_indices(). Without options it does not
    (inline remap occurs). Mirrors the adjacent test_defer_index_remap setup.

@github-actions github-actions Bot added A-python Python bindings bug Something isn't working labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-python Python bindings bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compaction.commit Python binding silently discards compaction options, making defer_index_remap impossible for distributed compaction

1 participant