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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1023 B
MySQL
Raw Normal View History

-- { echo }
SELECT 1.123::Decimal64(1);
SELECT 1.123::Decimal64(2);
SELECT 1.123::Decimal64(3);
SELECT 1.123::Decimal64(4);
SELECT 1.123::Decimal64(5);
SELECT 1.123::Decimal64(10);
SELECT 1::Decimal64(0);
SELECT 1::Decimal64(1);
SELECT 1::Decimal64(10);
SELECT 1.1234567::Decimal32(8);
SELECT 1.1234567890::Decimal64(10);
SELECT 1.1234567890::Decimal128(10);
SELECT 1.1234567890::Decimal256(10);
SELECT 1.123456789012345678901::Decimal256(20);
SELECT 1.123456789012345678901::Decimal256(22);
2021-08-17 06:02:37 +00:00
SET output_format_decimal_trailing_zeros = 1;
SELECT 1.123::Decimal64(1);
SELECT 1.123::Decimal64(2);
SELECT 1.123::Decimal64(3);
SELECT 1.123::Decimal64(4);
SELECT 1.123::Decimal64(5);
SELECT 1.123::Decimal64(10);
SELECT 1::Decimal64(0);
SELECT 1::Decimal64(1);
SELECT 1::Decimal64(10);
SELECT 1.1234567::Decimal32(8);
SELECT 1.1234567890::Decimal64(10);
SELECT 1.1234567890::Decimal128(10);
SELECT 1.1234567890::Decimal256(10);
SELECT 1.123456789012345678901::Decimal256(20);
SELECT 1.123456789012345678901::Decimal256(22);