pepijnve opened a new issue, #15129:
URL: https://github.com/apache/datafusion/issues/15129
### Is your feature request related to a problem or challenge?
The current window function implementation only supports constant window
frame boundaries. This restriction is reflected in the data model as well by
the fact that `WindowFrameBound` is defined as
```
pub enum WindowFrameBound {
Preceding(ScalarValue),
CurrentRow,
Following(ScalarValue),
}
```
rather than
```
pub enum WindowFrameBound {
Preceding(Expr),
CurrentRow,
Following(Expr),
}
```
In my particular use case I have a need for variable frame boundaries to be
able to compute aggregates over nested sets. I'm thinking of working on a patch
that makes the above modification to `WindowFrameBound` and pushes the check
that the `Expr` is actually a `Expr::Literal` down to the planning stage. Is
that a change that would be acceptable?
### Describe the solution you'd like
Adjust `WindowFrameBound` from
```
pub enum WindowFrameBound {
Preceding(ScalarValue),
CurrentRow,
Following(ScalarValue),
}
```
to
```
pub enum WindowFrameBound {
Preceding(Expr),
CurrentRow,
Following(Expr),
}
```
and check for `Expr::Literal` during planning.
### Describe alternatives you've considered
None; open to other suggestions.
### Additional context
_No response_
--
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]