Skip to content

Commit 09c0b90

Browse files
committed
Use selection of numeric types for example
1 parent 98cdc25 commit 09c0b90

1 file changed

Lines changed: 7 additions & 19 deletions

File tree

‎datafusion/expr-common/src/signature.rs‎

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -594,20 +594,6 @@ impl Display for ArrayFunctionArgument {
594594
}
595595
}
596596

597-
static NUMERICS: &[DataType] = &[
598-
DataType::Int8,
599-
DataType::Int16,
600-
DataType::Int32,
601-
DataType::Int64,
602-
DataType::UInt8,
603-
DataType::UInt16,
604-
DataType::UInt32,
605-
DataType::UInt64,
606-
DataType::Float16,
607-
DataType::Float32,
608-
DataType::Float64,
609-
];
610-
611597
impl TypeSignature {
612598
pub fn to_string_repr(&self) -> Vec<String> {
613599
match self {
@@ -926,11 +912,13 @@ impl TypeSignature {
926912
.cloned()
927913
.map(|data_type| vec![data_type])
928914
.collect(),
929-
TypeSignature::Numeric(arg_count) => NUMERICS
930-
.iter()
931-
.cloned()
932-
.map(|numeric_type| vec![numeric_type; *arg_count])
933-
.collect(),
915+
TypeSignature::Numeric(arg_count) => {
916+
[DataType::Int8, DataType::UInt64, DataType::Float32]
917+
.iter()
918+
.cloned()
919+
.map(|numeric_type| vec![numeric_type; *arg_count])
920+
.collect()
921+
}
934922
TypeSignature::String(arg_count) => get_data_types(&NativeType::String)
935923
.into_iter()
936924
.map(|dt| vec![dt; *arg_count])

0 commit comments

Comments
 (0)