panic: date_bin overflows scaling extreme Time64(Microsecond) origin
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in datafusion/functions/src/datetime/date_bin.rs at the reported line and run the provided EXPLAIN query to reproduce the planning-time panic. Add coverage for the extreme Time64(Microsecond) origin and verify that the query returns a DataFusion error instead of panicking.
Written by the indexing model from the issue text.
Description
Describe the bug
date_bin panics during planning/constant folding when scaling an extreme Time64(Microsecond) origin value.
To Reproduce
EXPLAIN SELECT date_bin(
INTERVAL '1 microsecond',
arrow_cast(0, 'Time64(Microsecond)'),
arrow_cast(9223372036854775807, 'Time64(Microsecond)')
);
Actual behavior
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.
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 354
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/datafusion
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/datafusion#25266 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/datafusion#25213 · 1 comment ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/datafusion#25168 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
apache/datafusion#24998 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/datafusion#24913 ·
All issues in apache/datafusion
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100