Dandandan opened a new issue, #22233: URL: https://github.com/apache/datafusion/issues/22233
### 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 ```sql SELECT DATE '2262-04-10' + INTERVAL '999999999' DAY; ``` ### Actual behavior ```text 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. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
