Skip to content

Commit 8a9653c

Browse files
Add regression coverage for DATE interval overflow (#22519)
## Summary - add sqllogictest coverage for DATE + INTERVAL day overflow near the Date32 boundary - assert the issue repro returns the existing `Date arithmetic overflow` error instead of panicking Closes #22233. ## Notes Current upstream `main` already returns the expected overflow error for this repro, so this PR is regression coverage only. ## Tests - `cargo test -p datafusion-expr-common test_overflow_handling -- --nocapture` - `cargo test --profile=ci --test sqllogictests -- datetime/arith_date_interval.slt` Co-authored-by: Puneet Dixit <puneetdixit200@users.noreply.github.com>
1 parent d54f969 commit 8a9653c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

datafusion/sqllogictest/test_files/datetime/arith_date_interval.slt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ SELECT arrow_cast('2020-01-01', 'Date64') + INTERVAL '999999' YEAR
4747

4848
query error Arrow error: Compute error: Date arithmetic overflow
4949
SELECT arrow_cast('2020-01-01', 'Date64') - INTERVAL '999999' YEAR
50+
51+
query error Arrow error: Compute error: Date arithmetic overflow
52+
SELECT DATE '2262-04-10' + INTERVAL '999999999' DAY

0 commit comments

Comments
 (0)