goldmedal commented on code in PR #13255:
URL: https://github.com/apache/datafusion/pull/13255#discussion_r1830299668


##########
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:
   Sounds great. I filed https://github.com/apache/datafusion/issues/13271 for 
it.



-- 
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]

Reply via email to