Skip to content

Conversation

@tbrinkman3
Copy link

No description provided.


Select only these columns or rows from the input. Opposite of `reject`.

This differs from `get` in that, rather than accessing the given value in the data structure, it removes all non-selected values from the structure.
Copy link
Contributor

@fdncred fdncred Jan 12, 2025

Choose a reason for hiding this comment

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

This statement is a little confusing. I always thought of get and select like this.

  • get gets the value out of the structure it is in
  • select selects the value maintaining the structure it is in

I'm not saying you have to use my words, but it would be better to say it a little differently than it currently is here.

Copy link
Author

Choose a reason for hiding this comment

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

That makes sense. I just grabbed the language from the implementation, scope commands | where name == select | get extra_description.0. I didn't realize it was already documented in the Book, so I will close this PR.

@NotTheDr01ds
Copy link
Contributor

NotTheDr01ds commented Jan 12, 2025

There's already Using get and select in the Book. While I realize this part of the Language Guide had a "TODO" on it, I'm not sure we need to repeat this. If there's anything we need to do to make the existing more clear, then can we just edit there and remove this TODO?

@tbrinkman3
Copy link
Author

@NotTheDr01ds I will close this if it is already documented in the Book. Thanks!

@fdncred
Copy link
Contributor

fdncred commented Jan 13, 2025

We could as least put pointers to where it is documents. The language guide is there for a reason and leaving it blank isn't a great idea in my opinion. There should probably be some minimal information, even if it's copied from where it is document in the book.

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.

3 participants