Skip to content

Fix cell path when getting columns of non-records#7508

Merged
rgwood merged 2 commits intonushell:mainfrom
rgwood:fix-cell-path
Dec 17, 2022
Merged

Fix cell path when getting columns of non-records#7508
rgwood merged 2 commits intonushell:mainfrom
rgwood:fix-cell-path

Conversation

@rgwood
Copy link
Copy Markdown
Contributor

@rgwood rgwood commented Dec 16, 2022

A follow-up to #7497. That change made it so that get foo would eliminate non-record rows; I think that was an unintentional and undesirable side-effect.

Before #7497:

〉[$nothing, { item: "foo" }] | get item
╭───┬─────╮
│ 0 │     │
│ 1 │ foo │
╰───┴─────╯

After #7497:

〉[$nothing, {item: "foo"}] | get item
╭───┬─────╮
│ 0 │ foo │
╰───┴─────╯

After this PR:

〉[$nothing, { item: "foo" }] | get item
╭───┬─────╮
│ 0 │     │
│ 1 │ foo │
╰───┴─────╯

cc: @merelymyself

Copy link
Copy Markdown
Member

@sholderbach sholderbach left a comment

Choose a reason for hiding this comment

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

Sounds good to me!

@rgwood rgwood merged commit 705f12c into nushell:main Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants