goldmedal commented on code in PR #13255:
URL: https://github.com/apache/datafusion/pull/13255#discussion_r1828682832
##########
datafusion/expr-common/src/signature.rs:
##########
@@ -243,6 +243,27 @@ impl TypeSignature {
_ => false,
}
}
+
+ /// get all possible types for the given `TypeSignature`
+ pub fn get_possible_types(&self) -> Vec<Vec<DataType>> {
+ match self {
+ TypeSignature::Exact(types) => vec![types.clone()],
+ TypeSignature::OneOf(types) => types
+ .iter()
+ .flat_map(|type_sig| type_sig.get_possible_types())
+ .collect(),
+ // TODO: Implement for other types
+ TypeSignature::Uniform(_, _)
+ | TypeSignature::Coercible(_)
Review Comment:
There is a follow-up issue for inferring the types from other TypeSignatures.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]