You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "avantgardnerio (via GitHub)" <gi...@apache.org> on 2025/10/12 16:57:16 UTC
[I] LimitPushPastWindows returns incorrect results for queries with `lead()` and `nth_value()` [datafusion]
avantgardnerio opened a new issue, #18028:
URL: https://github.com/apache/datafusion/issues/18028
### Describe the bug
Some analytical functions effect the effective window bounds by adding a lookahead (acausal) amount of rows. The current implementation of `LimitPushPastWindows` does not take this into account, does not grow the limit by the appropriate amount, and does not give them the input data necessary to compute the correct totals.
### To Reproduce
Run a query like:
```
SELECT LEAD(empno) OVER (ORDER BY empno ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM employees LIMIT 3
```
with `datafusion.optimizer.enable_window_limits` enabled/disabled to observe different results.
### Expected behavior
_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
Re: [I] LimitPushPastWindows returns incorrect results for queries with `lead()` [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #18028:
URL: https://github.com/apache/datafusion/issues/18028#issuecomment-3407274997
We are hoping to include this in 50.3.0:
- https://github.com/apache/datafusion/issues/18072
--
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
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
Re: [I] LimitPushPastWindows returns incorrect results for queries with `lead()` [datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan closed issue #18028: LimitPushPastWindows returns incorrect results for queries with `lead()`
URL: https://github.com/apache/datafusion/issues/18028
--
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
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