goldmedal commented on issue #13271: URL: https://github.com/apache/datafusion/issues/13271#issuecomment-2463703947
> * I'm wondering how the type signature for something like `Variadic` and `VariadicAny` can be represented? In `get_valid_types` it returns what is passed in. This behavior makes sense to me. `Variadic` means the user can input the ` One or more arguments` with the specific type. So, we can just return the result. > * The list of possible signatures for `Coercible` and `Any` could be quite large if we're looking to list all possible combinations For the `VariadicAny` and `Any`, one choice is just listing all the data types but it is exactly too large to show. I think we can introduce a new logical type, `ANY`, for it. That's how DuckDB handles the kind of signatures. ``` D select return_type, parameters, parameter_types from duckdb_functions() where function_name = 'concat'; ┌─────────────┬────────────┬─────────────────┐ │ return_type │ parameters │ parameter_types │ │ varchar │ varchar[] │ varchar[] │ ├─────────────┼────────────┼─────────────────┤ │ VARCHAR │ [col0] │ [ANY] │ └─────────────┴────────────┴─────────────────┘ ``` However, it isn't a good first issue. Let's ignore `VariadicAny` and `Any` in this issue. I might raise another issue for them. For `Coercible`, I think we can input all the data types. However, I think we can limit the scope. Currently, I think we don't need to handle the nested type. You can refer to what has been presented by the logical type in https://github.com/apache/datafusion/blob/f190fc6de6a6171c1cd6aa99233bc647ed8b1377/datafusion/common/src/types/builtin.rs#L34 Let's focus on them. > * I'm not sure how to handle `UserDefined`, it's doc suggests calling `ScalarUDFImpl::coerce_types` but we don't have a suitable list of types to pass into it to figure out the possible combinations, unless I'm missing something Ok, I think it should be another issue that isn't a good first issue. I will raise another ticket for it. Let's ignore it here. Thanks @delamarch3 , I think we can reorganize the scope of this issue. We can focus on the following signatures first: ``` TypeSignature::Uniform(_, _) | TypeSignature::Coercible(_) | TypeSignature::Variadic(_) | TypeSignature::Numeric(_) | TypeSignature::String(_) ``` We can handle others in the follow-up PRs. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org