Fix select cell path renaming behavior#13361
Merged
sholderbach merged 2 commits intonushell:mainfrom Jul 13, 2024
Merged
Conversation
Fixes nushell#13359 In an attempt to generate names for flat columns resulting from a nested accesses nushell#3016 generated new column names on nested selection, out of convenience, that composed the cell path as a string (including `.`) and then simply replaced all `.` with `_`. As we permit `.` in column names as long as you quote this surprisingly alters `select`ed columns.
New columns generated by selection with nested cell paths will for now be named with a string containing the keys separated by `.` instead of `_`. We may want to reconsider the semantics for nested access.
Member
Author
|
As the logic here currently uses |
Member
Author
|
I think there is more work to be done around |
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
Fixes #13359
In an attempt to generate names for flat columns resulting from a nested
accesses #3016 generated new column names on nested selection, out of
convenience, that composed the cell path as a string (including
.) andthen simply replaced all
.with_. As we permit.in column namesas long as you quote this surprisingly alters
selected columns.User-Facing Changes
New columns generated by selection with nested cell paths will for now
be named with a string containing the keys separated by
.instead of_. We may want to reconsider the semantics for nested access.Tests + Formatting
select