Describe the bug
Optimizer interval analysis hits unreachable!() when computing
properties for DATE + INTERVAL arithmetic near the date boundary.
handle_overflow at interval_arithmetic.rs:1168 panics rather than
returning the corresponding extreme value.
Same crash class as closed #14124 (Decimal128 unreachable in the same
module), but reached via DATE + INTERVAL. Still panics in 53.1.0.
To Reproduce
SELECT DATE '2262-04-10' + INTERVAL '999999999' DAY;
Actual behavior
thread 'main' panicked at datafusion/expr-common/src/interval_arithmetic.rs:1168:13:
internal error: entered unreachable code
Call path: handle_overflow → add_bounds → Interval::add →
BinaryExpr::get_properties.
Expected behavior
Return an execution/planning error about date arithmetic overflow.
Notes
Source: https://github.com/apache/datafusion/blob/53.1.0/datafusion/expr-common/src/interval_arithmetic.rs#L1168
Found via LLM-guided fuzz testing on DataFusion 53.1.0.
Describe the bug
Optimizer interval analysis hits
unreachable!()when computingproperties for
DATE + INTERVALarithmetic near the date boundary.handle_overflowatinterval_arithmetic.rs:1168panics rather thanreturning the corresponding extreme value.
Same crash class as closed #14124 (Decimal128 unreachable in the same
module), but reached via
DATE + INTERVAL. Still panics in 53.1.0.To Reproduce
Actual behavior
Call path:
handle_overflow→add_bounds→Interval::add→BinaryExpr::get_properties.Expected behavior
Return an execution/planning error about date arithmetic overflow.
Notes
Source: https://github.com/apache/datafusion/blob/53.1.0/datafusion/expr-common/src/interval_arithmetic.rs#L1168
Found via LLM-guided fuzz testing on DataFusion 53.1.0.