Def one UDF:
my_udf(expr, 'return_type')
Using:
case1:
my_duf(col, 'UInt32')
Return Type is:
DataType::UInt32
case2:
my_duf(col, 'UInt64')
Return Type is:
DataType::UInt64
At present, the above udf cannot be realized through the ReturnTypeFunction. This is because the ReturnTypeFunction provides only the data types of the input parameters.
As we discussed on #7657 (comment) arrow_cast does this but it is handled specially. This ticket tracks adding UDF support for it
Originally posted by @JasonLi-cn in #7657