Blizzara opened a new pull request, #12098:
URL: https://github.com/apache/datafusion/pull/12098
## Which issue does this PR close?
## Rationale for this change
While calling `with_alias` on `MakeArray`, we noticed some weird type
failures:
```
Error: Error(Inner { cause: Context("type_coercion", Plan("Coercion from
[Int32, Int32, Int32] to the signature OneOf([UserDefined, Any(0)]) failed.
```
That turned out to be because the
[AliasedScalarUDFImpl](https://github.com/apache/datafusion/blob/89677ae66ec2238ffd58de8c36fe6030fad458fa/datafusion/expr/src/udf.rs#L603)
doesn't implement `coerce_types`, so instead of using
`MakeArray::coerce_types` we'd end up using the default implementation of
ScalarUDFImpl which just
[throws](https://github.com/apache/datafusion/blob/89677ae66ec2238ffd58de8c36fe6030fad458fa/datafusion/expr/src/udf.rs#L553)
(that throw is then [ignored later
on](https://github.com/apache/datafusion/blob/89677ae66ec2238ffd58de8c36fe6030fad458fa/datafusion/expr/src/type_coercion/functions.rs#L176),
making this a bit hard to debug).
## What changes are included in this PR?
Implement the full set of functions in
Aliased[Scalar/Aggregate/Window]FunctionUDFImpl to pass through to inner UDF.
## Are these changes tested?
No.. any ideas on how to smartly test these? I can add a simple test for the
case we hit somewhere, but is there any generic way of guaranteeing that the
aliased versions re-implement all of the *UDFImpl methods?
## Are there any user-facing changes?
Mostly just fixes
--
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]