Skip to content

Commit 17ff223

Browse files
committed
Add test for UInt64 values exceeding i64::MAX
1 parent 8134491 commit 17ff223

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

datafusion/sqllogictest/test_files/datetime/timestamps.slt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5098,6 +5098,10 @@ SELECT to_timestamp_millis(arrow_cast(4294967295000, 'UInt64'));
50985098
----
50995099
2106-02-07T06:28:15
51005100

5101+
# Test UInt64 value larger than i64::MAX (9223372036854775808 = i64::MAX + 1)
5102+
query error Cast error: Can't cast value 9223372036854775808 to type Int64
5103+
SELECT to_timestamp_nanos(arrow_cast(9223372036854775808, 'UInt64'));
5104+
51015105
# Test boundary values for to_timestamp
51025106
query P
51035107
SELECT to_timestamp(arrow_cast(9223372036, 'Int64'));

0 commit comments

Comments
 (0)