()
| 48 | } |
| 49 | |
| 50 | pub fn aggregation_function_signatures() -> HashMap<&'static str, Signature> { |
| 51 | let mut map: HashMap<&'static str, Signature> = HashMap::new(); |
| 52 | map.insert( |
| 53 | "max", |
| 54 | Signature { |
| 55 | parameters: vec![Box::new(VariantType { |
| 56 | variants: vec![ |
| 57 | Box::new(IntType), |
| 58 | Box::new(FloatType), |
| 59 | Box::new(TextType), |
| 60 | Box::new(DateType), |
| 61 | Box::new(TimeType), |
| 62 | Box::new(DateTimeType), |
| 63 | ], |
| 64 | })], |
| 65 | return_type: Box::new(DynamicType { |
| 66 | function: first_element_type, |
| 67 | }), |
| 68 | }, |
| 69 | ); |
| 70 | map.insert( |
| 71 | "min", |
| 72 | Signature { |
| 73 | parameters: vec![Box::new(VariantType { |
| 74 | variants: vec![ |
| 75 | Box::new(IntType), |
| 76 | Box::new(FloatType), |
| 77 | Box::new(TextType), |
| 78 | Box::new(DateType), |
| 79 | Box::new(TimeType), |
| 80 | Box::new(DateTimeType), |
| 81 | ], |
| 82 | })], |
| 83 | return_type: Box::new(DynamicType { |
| 84 | function: first_element_type, |
| 85 | }), |
| 86 | }, |
| 87 | ); |
| 88 | map.insert( |
| 89 | "sum", |
| 90 | Signature { |
| 91 | parameters: vec![Box::new(IntType)], |
| 92 | return_type: Box::new(IntType), |
| 93 | }, |
| 94 | ); |
| 95 | map.insert( |
| 96 | "avg", |
| 97 | Signature { |
| 98 | parameters: vec![Box::new(IntType)], |
| 99 | return_type: Box::new(IntType), |
| 100 | }, |
| 101 | ); |
| 102 | map.insert( |
| 103 | "count", |
| 104 | Signature { |
| 105 | parameters: vec![Box::new(OptionType { |
| 106 | base: Some(Box::new(AnyType)), |
| 107 | })], |
no test coverage detected
searching dependent graphs…