Repository navigation
(#17448) Update label and help text on CantFindCol error - #18108
Merged
Merged
Conversation
be more precise about missing data suggest workarounds with optional access and `default`
Contributor
|
Thanks! |
This was referenced Nov 14, 2026
fdncred
pushed a commit
that referenced
this pull request
Nov 20, 2026
## Description Follow-up to #18108 for #17448. `rename --column` could report that a column was missing from the entire input when only a later record lacked it. ```nu [{name: Alice} {age: 30}] | rename -c {name: n} ``` The error now labels `rename` with `cannot rename column 'name'`. The existing highlight on `{age: 30}` now says `row 1 is missing column 'name'`. The error code is `nu::shell::unsupported_input`. ## User-facing changes (Release notes) `rename --column` now reports the zero-based index of the input row that is missing a requested column. ## Additional notes - Added regression coverage for a missing column in a later record and in a single record, the highlighted record span, and a successful mapped rename. - On macOS, seven rename integration tests and three rename unit tests passed. Formatting, both Clippy checks, Typos, and `git diff --check` also passed.
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.
Description
This PR addresses issue #17448. It improves the
CantFindColumnerror by being more precise about missing data and suggesting workarounds with optional access and thedefaultcommand.Please review the language, it may be too verbose or too specific to table-style access.
Example:
User-facing changes (Release notes)