Fix type signature of median (#9843)

Still support forming the median over homogeneous lists of `Duration` or
`Filesize`. Don't advertise `list<any>` as this can become funky when
given an even number of elements...

Work for #9812
This commit is contained in:
Stefan Holderbach 2023-07-28 23:32:26 +02:00 committed by GitHub
parent 6a7a23e3fa
commit 99ed8e42a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,8 @@ impl Command for SubCommand {
Signature::build("math median")
.input_output_types(vec![
(Type::List(Box::new(Type::Number)), Type::Number),
(Type::List(Box::new(Type::Duration)), Type::Duration),
(Type::List(Box::new(Type::Filesize)), Type::Filesize),
(Type::Table(vec![]), Type::Record(vec![])),
])
.allow_variants_without_examples(true)