Is your feature request related to a problem or challenge?
When implementing our InfuxQL frontend for DataFusion, we found certain functions we would like to express as window functions (like a specialized interpolation function for example)
We can write user defined aggregates:
select
x, my_aggregate(x, time)
from t;
But those do not produce the same number of rows that go in (they reduce cardinality)
We would like to use our own window functions like
select
x, my_interpolation_function(x, time) OVER (PARTITION BY y, ORDER BY time)
from t;
Describe the solution you'd like
I would like the ability to define, and register user defined window functions , like we have for user defined aggregate functions:
https://github.com/apache/arrow-datafusion/blob/8139ed40d06d77498217438ff52fe73a4ea16f61/datafusion-examples/examples/simple_udaf.rs#L18-L19
This would likely involve
It isn't clear to me if we would want to expose AggregateWindowExpr, for example
Describe alternatives you've considered
No response
Additional context
No response
Is your feature request related to a problem or challenge?
When implementing our InfuxQL frontend for DataFusion, we found certain functions we would like to express as window functions (like a specialized interpolation function for example)
We can write user defined aggregates:
But those do not produce the same number of rows that go in (they reduce cardinality)
We would like to use our own window functions like
Describe the solution you'd like
I would like the ability to define, and register user defined window functions , like we have for user defined aggregate functions:
https://github.com/apache/arrow-datafusion/blob/8139ed40d06d77498217438ff52fe73a4ea16f61/datafusion-examples/examples/simple_udaf.rs#L18-L19
This would likely involve
WindowUDF(likeAggregateUDF)WindowExprFunctionImplementationlike https://github.com/apache/arrow-datafusion/blob/8139ed40d06d77498217438ff52fe73a4ea16f61/datafusion/expr/src/function.rs#L48WindowExprtrait: https://github.com/apache/arrow-datafusion/blob/8139ed40d06d77498217438ff52fe73a4ea16f61/datafusion/physical-expr/src/window/window_expr.rs#L38-L143It isn't clear to me if we would want to expose
AggregateWindowExpr, for exampleDescribe alternatives you've considered
No response
Additional context
No response