jayzhan211 commented on PR #10560:
URL: https://github.com/apache/datafusion/pull/10560#issuecomment-2154664764
> ```rust
> AggregateExt
> ```
I don't think I get the point
I think we can get the AggregateFunction from the result of `call`
```rust
pub fn call(&self, args: Vec<Expr>) -> Expr {
Expr::AggregateFunction(AggregateFunction::new_udf(
Arc::new(self.clone()),
args,
false,
None,
None,
None,
))
}
```
The introduced extension functions are used for modifying AggregateFunction
*in-place*. Therefore, we don't need additional check for this.
Unless, we want to handle error for arbitrary `Expr`. For example, if
Expr::ScalarFunction go through the extension functions and we could get a
unexpected `Expr` silently or even panic. Is it the reason why we need
`build()`?
--
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]