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:11 UTC
[I] panic: date_bin overflows scaling extreme Time64(Microsecond) origin [datafusion]
Dandandan opened a new issue, #22216:
URL: https://github.com/apache/datafusion/issues/22216
### Describe the bug
`date_bin` panics during planning/constant folding when scaling an extreme `Time64(Microsecond)` origin value.
### To Reproduce
```sql
EXPLAIN SELECT date_bin(
INTERVAL '1 microsecond',
arrow_cast(0, 'Time64(Microsecond)'),
arrow_cast(9223372036854775807, 'Time64(Microsecond)')
);
```
### Actual behavior
```text
thread 'main' panicked at datafusion/functions/src/datetime/date_bin.rs:532:14:
attempt to multiply with overflow
```
### Expected behavior
Return a DataFusion error for the out-of-range origin conversion, 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: date_bin overflows scaling extreme Time64(Microsecond) origin [datafusion]
Posted by "u70b3 (via GitHub)" <gi...@apache.org>.
u70b3 commented on issue #22216:
URL: https://github.com/apache/datafusion/issues/22216#issuecomment-5019650819
Verified on current main (1e589287c): this no longer reproduces. The issue's repro query now plans successfully instead of panicking with `attempt to multiply with overflow`:
```sql
EXPLAIN SELECT date_bin(
INTERVAL '1 microsecond',
arrow_cast(0, 'Time64(Microsecond)'),
arrow_cast(9223372036854775807, 'Time64(Microsecond)')
);
```
The Time64 scaling path now uses checked arithmetic (`checked_scale_to_nanos`, from the #22610 date_bin overflow-fix series). The twin issue #22212 (same root cause, extreme value as the *source* argument) is fixed as well. Suggest closing both.
--
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: date_bin overflows scaling extreme Time64(Microsecond) origin [datafusion]
Posted by "Sean-Kenneth-Doherty (via GitHub)" <gi...@apache.org>.
Sean-Kenneth-Doherty commented on issue #22216:
URL: https://github.com/apache/datafusion/issues/22216#issuecomment-4470753582
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