mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 11:04:10 +00:00
0464859cfe
1. Added accurateCast function. 2. Use accurateCast in Set during execute. 3. Added accurateCast tests. 4. Updated select_in_different_types tests.
25 lines
1.0 KiB
SQL
25 lines
1.0 KiB
SQL
SELECT accurateCast(-1, 'UInt8'); -- { serverError 70 }
|
|
SELECT accurateCast(5, 'UInt8');
|
|
SELECT accurateCast(257, 'UInt8'); -- { serverError 70 }
|
|
SELECT accurateCast(-1, 'UInt16'); -- { serverError 70 }
|
|
SELECT accurateCast(5, 'UInt16');
|
|
SELECT accurateCast(65536, 'UInt16'); -- { serverError 70 }
|
|
SELECT accurateCast(-1, 'UInt32'); -- { serverError 70 }
|
|
SELECT accurateCast(5, 'UInt32');
|
|
SELECT accurateCast(4294967296, 'UInt32'); -- { serverError 70 }
|
|
SELECT accurateCast(-1, 'UInt64'); -- { serverError 70 }
|
|
SELECT accurateCast(5, 'UInt64');
|
|
SELECT accurateCast(-1, 'UInt256'); -- { serverError 70 }
|
|
SELECT accurateCast(5, 'UInt256');
|
|
|
|
SELECT accurateCast(-129, 'Int8'); -- { serverError 70 }
|
|
SELECT accurateCast(5, 'Int8');
|
|
SELECT accurateCast(128, 'Int8'); -- { serverError 70 }
|
|
|
|
SELECT accurateCast(10, 'Decimal32(9)'); -- { serverError 407 }
|
|
SELECT accurateCast(1, 'Decimal32(9)');
|
|
SELECT accurateCast(-10, 'Decimal32(9)'); -- { serverError 407 }
|
|
|
|
SELECT accurateCast('123', 'FixedString(2)'); -- { serverError 131 }
|
|
SELECT accurateCast('12', 'FixedString(2)');
|