Make stream info visible to users in describe (#7589)

Closes #7581.

After this PR, `describe` shows `(stream)` next to input that arrived at
`describe` as a `ListStream`:
```bash
〉ls | describe
table<name: string, type: string, size: filesize, modified: date> (stream)
〉[1 2 3] | each {|i| $i} | describe
list<int> (stream)
```

`describe` must collect all items of the stream to display type
information for lists and tables. If users need to avoid collecting
input, they can use the `-n`/`--no-collect` flag:

```bash
〉[1 2 3] | each {|i| $i} | describe --no-collect
stream
```
This commit is contained in:
Reilly Wood
2023-01-03 21:08:05 -08:00
committed by GitHub
parent bdd52f0111
commit 95d4922e44
6 changed files with 58 additions and 26 deletions

View File

@ -76,7 +76,7 @@ fn gets_last_row_as_list_when_amount_given() {
"#
));
assert_eq!(actual.out, "list<int>");
assert_eq!(actual.out, "list<int> (stream)");
}
#[test]