jiangzhx opened a new pull request, #7096:
URL: https://github.com/apache/arrow-datafusion/pull/7096
# Which issue does this PR close?
Closes #7094 .
# Rationale for this change
For someone who is new to DataFusion and is trying to write a custom UDAF,
it may be a little confusing to understand why create_udaf only takes one
DataType for the input_type. Additionally, I did not find any examples
demonstrating how to create a UDAF with multiple input arguments.
# What changes are included in this PR?
change `input_type: DataType` to `input_type: Vec<DataType>`
```
pub fn create_udaf(
name: &str,
return_type: Arc<DataType>,
volatility: Volatility,
accumulator: AccumulatorFactoryFunction,
state_type: Arc<Vec<DataType>>,
) -> AggregateUDF {
```
# Are these changes tested?
Yes
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
yes
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
--
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]