-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
group-by
should be able to output arrays too
#12772
Labels
Comments
13x1
added
enhancement
New feature or request
needs-triage
An issue that hasn't had any proper look
labels
May 5, 2024
This seems related to #12226 and the discussion there making |
I think the *-by command work with a column name and since lists don't have column names maybe it doesn't work. You could always ❯ [0 0 1 0 2 3 0 3 0 2 1 2] | wrap name | group-by name | table -e 1 02:02:24 PM
╭───┬──────────────╮
│ │ ╭─#─┬─name─╮ │
│ 0 │ │ 0 │ 0 │ │
│ │ │ 1 │ 0 │ │
│ │ │ 2 │ 0 │ │
│ │ │ 3 │ 0 │ │
│ │ │ 4 │ 0 │ │
│ │ ╰─#─┴─name─╯ │
│ │ ╭─#─┬name╮ │
│ 1 │ │ 0 │ 1 │ │
│ │ │ 1 │ 1 │ │
│ │ ╰───┴────╯ │
│ │ ╭─#─┬name╮ │
│ 2 │ │ 0 │ 2 │ │
│ │ │ 1 │ 2 │ │
│ │ │ 2 │ 2 │ │
│ │ ╰───┴────╯ │
│ │ ╭─#─┬name╮ │
│ 3 │ │ 0 │ 3 │ │
│ │ │ 1 │ 3 │ │
│ │ ╰───┴────╯ │
╰───┴──────────────╯ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Related problem
Short example:
You would expect those to work the same, but they don't:
That's because one of them is a record with keys "0", "1", "2", and "3", and one is actually an array.
Describe the solution you'd like
Allow group-by to output arrays (probably behind a flag in order to not break things), and maybe an
into array
command or anenumerare -r
(similar totranspose -r
) or something like that to fix problems like this.Describe alternatives you've considered
You can work around it with a few
into int
s, but it's annoying.Additional context and details
No response
The text was updated successfully, but these errors were encountered: