Open jayzhan211 opened 2 weeks ago
I plan to add distinct
macro in the follow up PR for count
.
This looks super cool @jayzhan211
THanks @jayzhan211 -- I will plan to review this tomorrow.
which means both adding many new functions as well as that they won't work for user defined aggregate functions
I think they can build the function with macro in function-aggregate, so they can have their function with ExprBuilder extension. But then I need to move the macro to datafusion-expr
🤔
maybe make an extension trait
It could be a good idea
Maybe we can just extend function for AggregateFunction
🤔
pub fn call(&self, args: Vec<Expr>) -> AggregateFunction
impl AggregateFunction {
fn build() -> Expr
}
Which issue does this PR close?
Closes #10545.
Rationale for this change
After this PR, there are two kinds of expression API. One is the normal one like
count(expr)
, convenient for expression that has few arguments. Another is builder mode, useful for expressions that expects multiple kind of arguments, likefirst_value_builder(expr).order_by().build()
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?