More tests

This commit is contained in:
Alexey Milovidov 2021-08-17 09:02:37 +03:00
parent 43602a838a
commit 6ea1bd1e8c
2 changed files with 34 additions and 17 deletions

View File

@ -1,32 +1,30 @@
-- { 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
1.1
1.12
1.123
1.1230
1.12300
1.1230000000
1
1.0
1.0000000000
1.12345670
1.1234567890
1.1234567890
1.1234567890
1.12345678901234567890
1.1234567890123456789010

View File

@ -16,3 +16,22 @@ SELECT 1.1234567890::Decimal128(10);
SELECT 1.1234567890::Decimal256(10);
SELECT 1.123456789012345678901::Decimal256(20);
SELECT 1.123456789012345678901::Decimal256(22);
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);