You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "comphead (via GitHub)" <gi...@apache.org> on 2026/05/08 23:00:23 UTC
[I] Support non-Literal default value for `LAG/LEAD` [datafusion-comet]
comphead opened a new issue, #4268:
URL: https://github.com/apache/datafusion-comet/issues/4268
### What is the problem the feature request solves?
Comet's native window execution path for `lag` / `lead` only accepts a **literal** as the third (default) argument. Queries like:
```sql
SELECT
b,
LAG(a, 1, c) OVER (ORDER BY b) AS lg,
LEAD(a, 1, c) OVER (ORDER BY b) AS ld
FROM t
```
…where the default expression is a column reference (or any non-Literal expression) currently fall back to Spark. Spark itself supports any expression in this position — the default argument is typed
as Expression, not Literal — so users hitting this pattern lose Comet acceleration on otherwise-supported window plans.
Depends on https://github.com/apache/datafusion/issues/22082
### Describe the potential solution
_No response_
### 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: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org