Skip to content

docs: correct alter_columns nullable docstring#7095

Open
Alowator wants to merge 1 commit into
lance-format:mainfrom
Alowator:docs/alter-columns-nullable-to-non-nullable
Open

docs: correct alter_columns nullable docstring#7095
Alowator wants to merge 1 commit into
lance-format:mainfrom
Alowator:docs/alter-columns-nullable-to-non-nullable

Conversation

@Alowator
Copy link
Copy Markdown

@Alowator Alowator commented Jun 4, 2026

Summary

The LanceDataset.alter_columns docstring states that a nullable column cannot be made non-nullable:

Only non-nullable columns can be changed to nullable. Currently, you cannot change a nullable column to non-nullable.

This is out of date. Support for changing a nullable column to non-nullable was added in #5589 (validate_no_nulls_before_making_non_nullable in rust/lance/src/dataset/schema_evolution.rs), and the Python binding already plumbs nullable through (python/src/dataset.rs). The only requirement is that the column contains no NULL values, otherwise an error is raised.

This PR updates the docstring to describe the actual behavior in both directions.

Changes

  • Reword the "nullable" parameter docs for alter_columns to reflect that a nullable column can be made non-nullable when it has no NULL values.

Notes

Docs-only change; no functional change and no test impact. Lint was deferred to CI for this docstring-only edit.

🤖 Generated with Claude Code

The alter_columns docstring claimed a nullable column cannot be made
non-nullable. That restriction was lifted in lance-format#5589; a nullable column
can now be made non-nullable as long as it contains no NULL values.
Update the docstring to describe the actual behavior in both directions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy link
Copy Markdown

@claude claude Bot left a comment

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 A-python Python bindings documentation Improvements or additions to documentation labels Jun 4, 2026
Copy link
Copy Markdown
Contributor

@prrao87 prrao87 left a comment

Choose a reason for hiding this comment

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

Thanks for the update! Just checked this in the Rust core, it makes sense and LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-python Python bindings documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants