ClickHouse/tests/queries/0_stateless/02009_decimal_no_trailing_zeros.reference

64 lines
1.3 KiB
Plaintext
Raw Normal View History

2021-08-17 07:15:17 +00:00
-- { echo }
SELECT 1.123::Decimal64(1);
1.1
2021-08-17 07:15:17 +00:00
SELECT 1.123::Decimal64(2);
1.12
2021-08-17 07:15:17 +00:00
SELECT 1.123::Decimal64(3);
1.123
2021-08-17 07:15:17 +00:00
SELECT 1.123::Decimal64(4);
1.123
2021-08-17 07:15:17 +00:00
SELECT 1.123::Decimal64(5);
1.123
2021-08-17 07:15:17 +00:00
SELECT 1.123::Decimal64(10);
1.123
2021-08-17 07:15:17 +00:00
SELECT 1::Decimal64(0);
1
2021-08-17 07:15:17 +00:00
SELECT 1::Decimal64(1);
1
2021-08-17 07:15:17 +00:00
SELECT 1::Decimal64(10);
1
2021-08-17 07:15:17 +00:00
SELECT 1.1234567::Decimal32(8);
1.1234567
2021-08-17 07:15:17 +00:00
SELECT 1.1234567890::Decimal64(10);
1.123456789
2021-08-17 07:15:17 +00:00
SELECT 1.1234567890::Decimal128(10);
1.123456789
2021-08-17 07:15:17 +00:00
SELECT 1.1234567890::Decimal256(10);
1.123456789
2021-08-17 07:15:17 +00:00
SELECT 1.123456789012345678901::Decimal256(20);
1.1234567890123456789
2021-08-17 07:15:17 +00:00
SELECT 1.123456789012345678901::Decimal256(22);
1.123456789012345678901
2021-08-17 07:15:17 +00:00
SET output_format_decimal_trailing_zeros = 1;
SELECT 1.123::Decimal64(1);
2021-08-17 06:02:37 +00:00
1.1
2021-08-17 07:15:17 +00:00
SELECT 1.123::Decimal64(2);
2021-08-17 06:02:37 +00:00
1.12
2021-08-17 07:15:17 +00:00
SELECT 1.123::Decimal64(3);
2021-08-17 06:02:37 +00:00
1.123
2021-08-17 07:15:17 +00:00
SELECT 1.123::Decimal64(4);
2021-08-17 06:02:37 +00:00
1.1230
2021-08-17 07:15:17 +00:00
SELECT 1.123::Decimal64(5);
2021-08-17 06:02:37 +00:00
1.12300
2021-08-17 07:15:17 +00:00
SELECT 1.123::Decimal64(10);
2021-08-17 06:02:37 +00:00
1.1230000000
2021-08-17 07:15:17 +00:00
SELECT 1::Decimal64(0);
2021-08-17 06:02:37 +00:00
1
2021-08-17 07:15:17 +00:00
SELECT 1::Decimal64(1);
2021-08-17 06:02:37 +00:00
1.0
2021-08-17 07:15:17 +00:00
SELECT 1::Decimal64(10);
2021-08-17 06:02:37 +00:00
1.0000000000
2021-08-17 07:15:17 +00:00
SELECT 1.1234567::Decimal32(8);
2021-08-17 06:02:37 +00:00
1.12345670
2021-08-17 07:15:17 +00:00
SELECT 1.1234567890::Decimal64(10);
2021-08-17 06:02:37 +00:00
1.1234567890
2021-08-17 07:15:17 +00:00
SELECT 1.1234567890::Decimal128(10);
2021-08-17 06:02:37 +00:00
1.1234567890
2021-08-17 07:15:17 +00:00
SELECT 1.1234567890::Decimal256(10);
2021-08-17 06:02:37 +00:00
1.1234567890
2021-08-17 07:15:17 +00:00
SELECT 1.123456789012345678901::Decimal256(20);
2021-08-17 06:02:37 +00:00
1.12345678901234567890
2021-08-17 07:15:17 +00:00
SELECT 1.123456789012345678901::Decimal256(22);
2021-08-17 06:02:37 +00:00
1.1234567890123456789010