docs: correct alter_columns nullable docstring#7095
Open
Alowator wants to merge 1 commit into
Open
Conversation
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>
prrao87
approved these changes
Jun 5, 2026
Contributor
prrao87
left a comment
There was a problem hiding this comment.
Thanks for the update! Just checked this in the Rust core, it makes sense and LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
LanceDataset.alter_columnsdocstring states that a nullable column cannot be made 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_nullableinrust/lance/src/dataset/schema_evolution.rs), and the Python binding already plumbsnullablethrough (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
"nullable"parameter docs foralter_columnsto 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