Skip to content

Commit ffd02c4

Browse files
committed
add possible types
Signed-off-by: Jay Zhan <[email protected]>
1 parent c6ef8a5 commit ffd02c4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

datafusion/expr-common/src/signature.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! Signature module contains foundational types that are used to represent signatures, types,
1919
//! and return types of functions in DataFusion.
2020
21-
use crate::type_coercion::aggregates::{NUMERICS, STRINGS};
21+
use crate::type_coercion::aggregates::NUMERICS;
2222
use arrow::datatypes::DataType;
2323
use datafusion_common::types::{LogicalTypeRef, NativeType};
2424
use itertools::Itertools;
@@ -292,12 +292,13 @@ impl TypeSignature {
292292
.cloned()
293293
.map(|numeric_type| vec![numeric_type; *arg_count])
294294
.collect(),
295-
TypeSignature::String(arg_count) => STRINGS
296-
.iter()
297-
.cloned()
298-
.map(|string_type| vec![string_type; *arg_count])
299-
.collect(),
300-
TypeSignature::Boolean(arg_count) => vec![vec![DataType::Boolean; *arg_count]],
295+
TypeSignature::String(arg_count) => get_data_types(&NativeType::String)
296+
.into_iter()
297+
.map(|dt| vec![dt; *arg_count])
298+
.collect::<Vec<_>>(),
299+
TypeSignature::Boolean(arg_count) => {
300+
vec![vec![DataType::Boolean; *arg_count]]
301+
}
301302
// TODO: Implement for other types
302303
TypeSignature::Any(_)
303304
| TypeSignature::VariadicAny

0 commit comments

Comments
 (0)