mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Update tests
This commit is contained in:
parent
6111cbec7f
commit
7c4fb669db
@ -11,6 +11,26 @@
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000000 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 0.000000000000000001 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.00000 0.000000000 99999999999999999999.999999999999999999 0
|
||||
0 0 0 0.000000000 0.000000000000000000 0.99999999999999999999999999999999999999 0.00000 0.000000000 0.000000000000000000 0
|
||||
|
@ -39,26 +39,26 @@ INSERT INTO decimal (i) VALUES (-100000000000000000000); -- { clientError 69 }
|
||||
INSERT INTO decimal (j) VALUES (10); -- { clientError 69 }
|
||||
INSERT INTO decimal (j) VALUES (-10); -- { clientError 69 }
|
||||
|
||||
INSERT INTO decimal (a) VALUES (0.1); -- { clientError 69 }
|
||||
INSERT INTO decimal (a) VALUES (-0.1); -- { clientError 69 }
|
||||
INSERT INTO decimal (b) VALUES (0.1); -- { clientError 69 }
|
||||
INSERT INTO decimal (b) VALUES (-0.1); -- { clientError 69 }
|
||||
INSERT INTO decimal (c) VALUES (0.1); -- { clientError 69 }
|
||||
INSERT INTO decimal (c) VALUES (-0.1); -- { clientError 69 }
|
||||
INSERT INTO decimal (d) VALUES (0.0000000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (d) VALUES (-0.0000000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (e) VALUES (0.0000000000000000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (e) VALUES (-0.0000000000000000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (f) VALUES (0.000000000000000000000000000000000000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (f) VALUES (-0.000000000000000000000000000000000000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (g) VALUES (0.000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (g) VALUES (-0.000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (h) VALUES (0.0000000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (h) VALUES (-0.0000000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (i) VALUES (0.0000000000000000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (i) VALUES (-0.0000000000000000001); -- { clientError 69 }
|
||||
INSERT INTO decimal (j) VALUES (0.1); -- { clientError 69 }
|
||||
INSERT INTO decimal (j) VALUES (-0.1); -- { clientError 69 }
|
||||
INSERT INTO decimal (a) VALUES (0.1);
|
||||
INSERT INTO decimal (a) VALUES (-0.1);
|
||||
INSERT INTO decimal (b) VALUES (0.1);
|
||||
INSERT INTO decimal (b) VALUES (-0.1);
|
||||
INSERT INTO decimal (c) VALUES (0.1);
|
||||
INSERT INTO decimal (c) VALUES (-0.1);
|
||||
INSERT INTO decimal (d) VALUES (0.0000000001);
|
||||
INSERT INTO decimal (d) VALUES (-0.0000000001);
|
||||
INSERT INTO decimal (e) VALUES (0.0000000000000000001);
|
||||
INSERT INTO decimal (e) VALUES (-0.0000000000000000001);
|
||||
INSERT INTO decimal (f) VALUES (0.000000000000000000000000000000000000001);
|
||||
INSERT INTO decimal (f) VALUES (-0.000000000000000000000000000000000000001);
|
||||
INSERT INTO decimal (g) VALUES (0.000001);
|
||||
INSERT INTO decimal (g) VALUES (-0.000001);
|
||||
INSERT INTO decimal (h) VALUES (0.0000000001);
|
||||
INSERT INTO decimal (h) VALUES (-0.0000000001);
|
||||
INSERT INTO decimal (i) VALUES (0.0000000000000000001);
|
||||
INSERT INTO decimal (i) VALUES (-0.0000000000000000001);
|
||||
INSERT INTO decimal (j) VALUES (0.1);
|
||||
INSERT INTO decimal (j) VALUES (-0.1);
|
||||
|
||||
INSERT INTO decimal (a, b, d, g) VALUES (999999999, 999999999999999999, 0.999999999, 9999.99999);
|
||||
INSERT INTO decimal (a, b, d, g) VALUES (-999999999, -999999999999999999, -0.999999999, -9999.99999);
|
||||
@ -90,8 +90,8 @@ INSERT INTO decimal (a) VALUES ('0x1'); -- { clientError 6 }
|
||||
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('0.9e9', '0.9e18', '0.9e38', '9e-9', '9e-18', '9e-38');
|
||||
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('-0.9e9', '-0.9e18', '-0.9e38', '-9e-9', '-9e-18', '-9e-38');
|
||||
|
||||
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('1e9', '1e18', '1e38', '1e-10', '1e-19', '1e-39'); -- { clientError 69 }
|
||||
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('-1e9', '-1e18', '-1e38', '-1e-10', '-1e-19', '-1e-39'); -- { clientError 69 }
|
||||
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('1e9', '1e18', '1e38', '1e-10', '1e-19', '1e-39'); -- { clientError 69 }
|
||||
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('-1e9', '-1e18', '-1e38', '-1e-10', '-1e-19', '-1e-39'); -- { clientError 69 }
|
||||
|
||||
SELECT * FROM decimal ORDER BY a, b, c, d, e, f, g, h, i, j;
|
||||
DROP TABLE IF EXISTS decimal;
|
||||
|
@ -1,5 +1,30 @@
|
||||
1.1 1.10 1.10000000
|
||||
1
|
||||
1 1.1 1.10 1.10000000
|
||||
0.1 0
|
||||
-0.1 0
|
||||
0.1 0
|
||||
-0.1 0
|
||||
0.1 0
|
||||
-0.1 0
|
||||
0.0000000001 0.000000000
|
||||
-0.0000000001 0.000000000
|
||||
0.0000000000000000001 0.000000000000000000
|
||||
-0.0000000000000000001 0.000000000000000000
|
||||
0.000000000000000000000000000000000000001 0.00000000000000000000000000000000000000
|
||||
-0.000000000000000000000000000000000000001 0.00000000000000000000000000000000000000
|
||||
1e-1 0
|
||||
-1e-1 0
|
||||
1e-1 0
|
||||
-1e-1 0
|
||||
1e-1 0
|
||||
-1e-1 0
|
||||
1e-10 0.000000000
|
||||
-1e-10 0.000000000
|
||||
1e-19 0.000000000000000000
|
||||
-1e-19 0.000000000000000000
|
||||
1e-39 0.00000000000000000000000000000000000000
|
||||
-1e-39 0.00000000000000000000000000000000000000
|
||||
9999999 9999999 -9999999 9999999 -9999999
|
||||
999999.9 999999.9 -999999.9 999999.9 -999999.9
|
||||
99999.99 99999.99 -99999.99 99999.99 -99999.99
|
||||
@ -129,6 +154,9 @@
|
||||
12345678901234567890123456789012345678
|
||||
0.123456789 0.123456789123456789
|
||||
0.12345678901234567890123456789012345678
|
||||
0.12345678
|
||||
0.12345678912345678
|
||||
0.1234567890123456789012345678901234567
|
||||
1234567890.0000000000000000000000000000 1234567890.00000000000000000000000000000 1234567890.00000000000000000000000000000
|
||||
1234567890.00000000 1234567890.000000000 1234567890.000000000
|
||||
12345678.0 12345678.00 12345678.00
|
||||
|
@ -1,5 +1,5 @@
|
||||
SELECT toDecimal32('1.1', 1), toDecimal32('1.1', 2), toDecimal32('1.1', 8);
|
||||
SELECT toDecimal32('1.1', 0); -- { serverError 69 }
|
||||
SELECT toDecimal32('1.1', 0);
|
||||
SELECT toDecimal32(1.1, 0), toDecimal32(1.1, 1), toDecimal32(1.1, 2), toDecimal32(1.1, 8);
|
||||
|
||||
SELECT '1000000000' AS x, toDecimal32(x, 0); -- { serverError 69 }
|
||||
@ -15,18 +15,18 @@ SELECT '-1' AS x, toDecimal64(x, 18); -- { serverError 69 }
|
||||
SELECT '1' AS x, toDecimal128(x, 38); -- { serverError 69 }
|
||||
SELECT '-1' AS x, toDecimal128(x, 38); -- { serverError 69 }
|
||||
|
||||
SELECT '0.1' AS x, toDecimal32(x, 0); -- { serverError 69 }
|
||||
SELECT '-0.1' AS x, toDecimal32(x, 0); -- { serverError 69 }
|
||||
SELECT '0.1' AS x, toDecimal64(x, 0); -- { serverError 69 }
|
||||
SELECT '-0.1' AS x, toDecimal64(x, 0); -- { serverError 69 }
|
||||
SELECT '0.1' AS x, toDecimal128(x, 0); -- { serverError 69 }
|
||||
SELECT '-0.1' AS x, toDecimal128(x, 0); -- { serverError 69 }
|
||||
SELECT '0.0000000001' AS x, toDecimal32(x, 9); -- { serverError 69 }
|
||||
SELECT '-0.0000000001' AS x, toDecimal32(x, 9); -- { serverError 69 }
|
||||
SELECT '0.0000000000000000001' AS x, toDecimal64(x, 18); -- { serverError 69 }
|
||||
SELECT '-0.0000000000000000001' AS x, toDecimal64(x, 18); -- { serverError 69 }
|
||||
SELECT '0.000000000000000000000000000000000000001' AS x, toDecimal128(x, 38); -- { serverError 69 }
|
||||
SELECT '-0.000000000000000000000000000000000000001' AS x, toDecimal128(x, 38); -- { serverError 69 }
|
||||
SELECT '0.1' AS x, toDecimal32(x, 0);
|
||||
SELECT '-0.1' AS x, toDecimal32(x, 0);
|
||||
SELECT '0.1' AS x, toDecimal64(x, 0);
|
||||
SELECT '-0.1' AS x, toDecimal64(x, 0);
|
||||
SELECT '0.1' AS x, toDecimal128(x, 0);
|
||||
SELECT '-0.1' AS x, toDecimal128(x, 0);
|
||||
SELECT '0.0000000001' AS x, toDecimal32(x, 9);
|
||||
SELECT '-0.0000000001' AS x, toDecimal32(x, 9);
|
||||
SELECT '0.0000000000000000001' AS x, toDecimal64(x, 18);
|
||||
SELECT '-0.0000000000000000001' AS x, toDecimal64(x, 18);
|
||||
SELECT '0.000000000000000000000000000000000000001' AS x, toDecimal128(x, 38);
|
||||
SELECT '-0.000000000000000000000000000000000000001' AS x, toDecimal128(x, 38);
|
||||
|
||||
SELECT '1e9' AS x, toDecimal32(x, 0); -- { serverError 69 }
|
||||
SELECT '-1E9' AS x, toDecimal32(x, 0); -- { serverError 69 }
|
||||
@ -41,18 +41,18 @@ SELECT '-1e-0' AS x, toDecimal64(x, 18); -- { serverError 69 }
|
||||
SELECT '1e-0' AS x, toDecimal128(x, 38); -- { serverError 69 }
|
||||
SELECT '-1e0' AS x, toDecimal128(x, 38); -- { serverError 69 }
|
||||
|
||||
SELECT '1e-1' AS x, toDecimal32(x, 0); -- { serverError 69 }
|
||||
SELECT '-1e-1' AS x, toDecimal32(x, 0); -- { serverError 69 }
|
||||
SELECT '1e-1' AS x, toDecimal64(x, 0); -- { serverError 69 }
|
||||
SELECT '-1e-1' AS x, toDecimal64(x, 0); -- { serverError 69 }
|
||||
SELECT '1e-1' AS x, toDecimal128(x, 0); -- { serverError 69 }
|
||||
SELECT '-1e-1' AS x, toDecimal128(x, 0); -- { serverError 69 }
|
||||
SELECT '1e-10' AS x, toDecimal32(x, 9); -- { serverError 69 }
|
||||
SELECT '-1e-10' AS x, toDecimal32(x, 9); -- { serverError 69 }
|
||||
SELECT '1e-19' AS x, toDecimal64(x, 18); -- { serverError 69 }
|
||||
SELECT '-1e-19' AS x, toDecimal64(x, 18); -- { serverError 69 }
|
||||
SELECT '1e-39' AS x, toDecimal128(x, 38); -- { serverError 69 }
|
||||
SELECT '-1e-39' AS x, toDecimal128(x, 38); -- { serverError 69 }
|
||||
SELECT '1e-1' AS x, toDecimal32(x, 0);
|
||||
SELECT '-1e-1' AS x, toDecimal32(x, 0);
|
||||
SELECT '1e-1' AS x, toDecimal64(x, 0);
|
||||
SELECT '-1e-1' AS x, toDecimal64(x, 0);
|
||||
SELECT '1e-1' AS x, toDecimal128(x, 0);
|
||||
SELECT '-1e-1' AS x, toDecimal128(x, 0);
|
||||
SELECT '1e-10' AS x, toDecimal32(x, 9);
|
||||
SELECT '-1e-10' AS x, toDecimal32(x, 9);
|
||||
SELECT '1e-19' AS x, toDecimal64(x, 18);
|
||||
SELECT '-1e-19' AS x, toDecimal64(x, 18);
|
||||
SELECT '1e-39' AS x, toDecimal128(x, 38);
|
||||
SELECT '-1e-39' AS x, toDecimal128(x, 38);
|
||||
|
||||
SELECT toFloat32(9999999) as x, toDecimal32(x, 0), toDecimal32(-x, 0), toDecimal64(x, 0), toDecimal64(-x, 0);
|
||||
SELECT toFloat32(999999.9) as x, toDecimal32(x, 1), toDecimal32(-x, 1), toDecimal64(x, 1), toDecimal64(-x, 1);
|
||||
@ -143,9 +143,9 @@ SELECT CAST('12345678901234567890123456789012345678', 'Decimal(38,1)'); -- { ser
|
||||
|
||||
SELECT CAST('0.123456789', 'Decimal(9,9)'), CAST('0.123456789123456789', 'Decimal(18,18)');
|
||||
SELECT CAST('0.12345678901234567890123456789012345678', 'Decimal(38,38)');
|
||||
SELECT CAST('0.123456789', 'Decimal(9,8)'); -- { serverError 69 }
|
||||
SELECT CAST('0.123456789123456789', 'Decimal(18,17)'); -- { serverError 69 }
|
||||
SELECT CAST('0.12345678901234567890123456789012345678', 'Decimal(38,37)'); -- { serverError 69 }
|
||||
SELECT CAST('0.123456789', 'Decimal(9,8)');
|
||||
SELECT CAST('0.123456789123456789', 'Decimal(18,17)');
|
||||
SELECT CAST('0.12345678901234567890123456789012345678', 'Decimal(38,37)');
|
||||
|
||||
SELECT toDecimal128('1234567890', 28) AS x, toDecimal128(x, 29), toDecimal128(toDecimal128('1234567890', 28), 29);
|
||||
SELECT toDecimal128(toDecimal128('1234567890', 28), 30); -- { serverError 407 }
|
||||
|
Loading…
Reference in New Issue
Block a user