ClickHouse/tests/queries/0_stateless/02009_decimal_no_trailing_zeros.reference
Alexey Milovidov 1a3b72fa09 Update test
2021-08-17 10:15:17 +03:00

64 lines
1.3 KiB
Plaintext

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