Adjust signatures for cellpath access of tables (#9778)

# Description
Reallow the commands that take cellpaths as rest parameters to operate
on table input data.

Went through all commands returned by

```
scope commands |
  filter { |cmd| $cmd.signatures |
    values |
    any {|sig| $sig |
      any {|$sig| $sig.parameter_type == rest and $sig.syntax_shape ==
cellpath }
    }
  } | get name
```

Only exception to that was `is-empty` that returns a bool.
# User-Facing Changes
Same table operations as in `0.82` should still be possible
Mitigates effects of #9680
This commit is contained in:
Stefan Holderbach
2023-07-24 13:17:30 +02:00
committed by GitHub
parent d7ebe5fdc3
commit 9db0d6bd34
24 changed files with 70 additions and 10 deletions

View File

@ -17,7 +17,12 @@ impl Command for SubCommand {
fn signature(&self) -> Signature {
Signature::build("url encode")
.input_output_types(vec![(Type::String, Type::String), (Type::List(Box::new(Type::String)), Type::List(Box::new(Type::String)))])
.input_output_types(vec![
(Type::String, Type::String),
(Type::List(Box::new(Type::String)), Type::List(Box::new(Type::String))),
(Type::Table(vec![]), Type::Table(vec![])),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.switch(
"all",

View File

@ -17,7 +17,11 @@ impl Command for SubCommand {
fn signature(&self) -> Signature {
Signature::build("url parse")
.input_output_types(vec![(Type::String, Type::Record(vec![]))])
.input_output_types(vec![
(Type::String, Type::Record(vec![])),
(Type::Table(vec![]), Type::Table(vec![])),
])
.allow_variants_without_examples(true)
.rest(
"rest",
SyntaxShape::CellPath,