mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
add test
This commit is contained in:
parent
4c49539ad7
commit
0d134f2c26
15
tests/queries/0_stateless/01459_decimal_casts.reference
Normal file
15
tests/queries/0_stateless/01459_decimal_casts.reference
Normal file
@ -0,0 +1,15 @@
|
||||
0 0.0 0.00000 0.000000 0.0000000
|
||||
1 1.0 1.00000 1.000000 1.0000000
|
||||
2 2.0 2.00000 2.000000 2.0000000
|
||||
3 3.0 3.00000 3.000000 3.0000000
|
||||
4 4.0 4.00000 4.000000 4.0000000
|
||||
5 5.0 5.00000 5.000000 5.0000000
|
||||
6 6.0 6.00000 6.000000 6.0000000
|
||||
7 7.0 7.00000 7.000000 7.0000000
|
||||
8 8.0 8.00000 8.000000 8.0000000
|
||||
9 9 9
|
||||
10 10 10
|
||||
11 11 11
|
||||
12 12 12
|
||||
13 13 13
|
||||
14 14 14
|
16
tests/queries/0_stateless/01459_decimal_casts.sql
Normal file
16
tests/queries/0_stateless/01459_decimal_casts.sql
Normal file
@ -0,0 +1,16 @@
|
||||
SELECT toUInt32(number) y, toDecimal32(y, 1), toDecimal64(y, 5), toDecimal128(y, 6), toDecimal256(y, 7) FROM numbers(1);
|
||||
SELECT toInt32(number) y, toDecimal32(y, 1), toDecimal64(y, 5), toDecimal128(y, 6), toDecimal256(y, 7) FROM numbers(1, 1);
|
||||
SELECT toInt64(number) y, toDecimal32(y, 1), toDecimal64(y, 5), toDecimal128(y, 6), toDecimal256(y, 7) FROM numbers(2, 1);
|
||||
SELECT toUInt64(number) y, toDecimal32(y, 1), toDecimal64(y, 5), toDecimal128(y, 6), toDecimal256(y, 7) FROM numbers(3, 1);
|
||||
SELECT toInt128(number) y, toDecimal32(y, 1), toDecimal64(y, 5), toDecimal128(y, 6), toDecimal256(y, 7) FROM numbers(4, 1);
|
||||
SELECT toInt256(number) y, toDecimal32(y, 1), toDecimal64(y, 5), toDecimal128(y, 6), toDecimal256(y, 7) FROM numbers(5, 1);
|
||||
SELECT toUInt256(number) y, toDecimal32(y, 1), toDecimal64(y, 5), toDecimal128(y, 6), toDecimal256(y, 7) FROM numbers(6, 1);
|
||||
SELECT toFloat32(number) y, toDecimal32(y, 1), toDecimal64(y, 5), toDecimal128(y, 6), toDecimal256(y, 7) FROM numbers(7, 1);
|
||||
SELECT toFloat64(number) y, toDecimal32(y, 1), toDecimal64(y, 5), toDecimal128(y, 6), toDecimal256(y, 7) FROM numbers(8, 1);
|
||||
|
||||
SELECT toInt32(toDecimal32(number, 1)), toInt64(toDecimal32(number, 1)), toInt128(toDecimal32(number, 1)) FROM numbers(9, 1);
|
||||
SELECT toInt32(toDecimal64(number, 2)), toInt64(toDecimal64(number, 2)), toInt128(toDecimal64(number, 2)) FROM numbers(10, 1);
|
||||
SELECT toInt32(toDecimal128(number, 3)), toInt64(toDecimal128(number, 3)), toInt128(toDecimal128(number, 3)) FROM numbers(11, 1);
|
||||
SELECT toFloat32(toDecimal32(number, 1)), toFloat32(toDecimal64(number, 2)), toFloat32(toDecimal128(number, 3)) FROM numbers(12, 1);
|
||||
SELECT toFloat64(toDecimal32(number, 1)), toFloat64(toDecimal64(number, 2)), toFloat64(toDecimal128(number, 3)) FROM numbers(13, 1);
|
||||
SELECT toInt256(toDecimal32(number, 1)), toInt256(toDecimal64(number, 2)), toInt256(toDecimal128(number, 3)) FROM numbers(14, 1);
|
Loading…
Reference in New Issue
Block a user