You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2026/05/15 19:32:21 UTC
[I] panic: lag window function negates i64::MIN offset during execution [datafusion]
Dandandan opened a new issue, #22223:
URL: https://github.com/apache/datafusion/issues/22223
### Describe the bug
`lag` panics during execution when given `i64::MIN` as the offset. The execution path negates the stored negative shift offset.
### To Reproduce
```sql
SELECT lag(x, -9223372036854775808) OVER (ORDER BY x)
FROM (VALUES (1)) AS t(x);
```
### Actual behavior
```text
thread 'main' panicked at datafusion/functions-window/src/lead_lag.rs:520:57:
attempt to negate with overflow
```
### Expected behavior
Return an execution error for an invalid offset, not a panic.
--
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] panic: lag window function negates i64::MIN offset during execution [datafusion]
Posted by "chakkk309 (via GitHub)" <gi...@apache.org>.
chakkk309 commented on issue #22223:
URL: https://github.com/apache/datafusion/issues/22223#issuecomment-4582925612
> It looks like this has already been fixed by #22243
Thanks for pointing this out. I had opened #22338 for this, but after #22243 was merged I verified that it already covers this case.
cc @Dandandan, closing this issue as fixed by #22243 sounds good to me:)
--
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] panic: lag window function negates i64::MIN offset during execution [datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on issue #22223:
URL: https://github.com/apache/datafusion/issues/22223#issuecomment-4583804772
Thanks @chakkk309 @Nagato-Yuzuru !
--
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] panic: lag window function negates i64::MIN offset during execution [datafusion]
Posted by "chakkk309 (via GitHub)" <gi...@apache.org>.
chakkk309 commented on issue #22223:
URL: https://github.com/apache/datafusion/issues/22223#issuecomment-4470900905
take
--
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] panic: lag window function negates i64::MIN offset during execution [datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan closed issue #22223: panic: lag window function negates i64::MIN offset during execution
URL: https://github.com/apache/datafusion/issues/22223
--
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] panic: lag window function negates i64::MIN offset during execution [datafusion]
Posted by "Nagato-Yuzuru (via GitHub)" <gi...@apache.org>.
Nagato-Yuzuru commented on issue #22223:
URL: https://github.com/apache/datafusion/issues/22223#issuecomment-4582794082
It looks like this has already been fixed by #22243
--
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