From 1f69f8c475343f068cbd9316bcaa3b7933663a56 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 8 May 2021 03:33:01 +0300 Subject: [PATCH] Make test for Decimal correct --- .../0_stateless/00700_decimal_round.reference | 30 +++++++++---------- .../0_stateless/00700_decimal_round.sql | 30 +++++++++---------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/queries/0_stateless/00700_decimal_round.reference b/tests/queries/0_stateless/00700_decimal_round.reference index 11281cdeeb6..230b6863411 100644 --- a/tests/queries/0_stateless/00700_decimal_round.reference +++ b/tests/queries/0_stateless/00700_decimal_round.reference @@ -58,18 +58,18 @@ -12345.6789 -12340.0000 -12300.0000 -12000.0000 -10000.0000 0.0000 -12345.6789 -12350.0000 -12400.0000 -13000.0000 -20000.0000 -100000.0000 -12345.6789 -12340.0000 -12300.0000 -12000.0000 -10000.0000 0.0000 -123456789.123456784 -123456789.123456784 123456789.000000000 -123456789.000000000 123456789.123460000 -123456789.123460000 123500000.000000000 -123500000.000000000 -123456789.123456784 -123456789.123456784 123456789.000000000 -123456789.000000000 123456789.123460000 -123456789.123460000 123500000.000000000 -123500000.000000000 -123456789.123456784 -123456789.123456784 123456790.000000000 -123456789.000000000 123456789.123460000 -123456789.123450000 123500000.000000000 -123400000.000000000 -123456789.123456784 -123456789.123456784 123456789.000000000 -123456790.000000000 123456789.123450000 -123456789.123460000 123400000.000000000 -123500000.000000000 -123456789.123456784 -123456789.123456784 123456789.000000000 -123456789.000000000 123456789.123450000 -123456789.123450000 123400000.000000000 -123400000.000000000 -12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324607.000000000 12345678901234567525491324606.797000000 -12345678901234567525491324606.797000000 -12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324607.000000000 12345678901234567525491324606.797000000 -12345678901234567525491324606.797000000 -12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324606.000000000 12345678901234567525491324606.798000000 -12345678901234567525491324606.797000000 -12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324606.000000000 -12345678901234567525491324607.000000000 12345678901234567525491324606.797000000 -12345678901234567525491324606.798000000 -12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324606.000000000 -12345678901234567525491324606.000000000 12345678901234567525491324606.797000000 -12345678901234567525491324606.797000000 -12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324607.000000000 12345678901234567525491325000.000000000 -12345678901234567525491325000.000000000 -12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324607.000000000 12345678901234567525491325000.000000000 -12345678901234567525491325000.000000000 -12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324607.000000000 -12345678901234567525491324606.000000000 12345678901234567525491325000.000000000 -12345678901234567525491324000.000000000 -12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324606.000000000 -12345678901234567525491324607.000000000 12345678901234567525491324000.000000000 -12345678901234567525491325000.000000000 -12345678901234567525491324606.797053952 -12345678901234567525491324606.797053952 12345678901234567525491324606.000000000 -12345678901234567525491324606.000000000 12345678901234567525491324000.000000000 -12345678901234567525491324000.000000000 +123456789.123456789 -123456789.123456789 123456789.000000000 -123456789.000000000 123456789.123460000 -123456789.123460000 123500000.000000000 -123500000.000000000 +123456789.123456789 -123456789.123456789 123456789.000000000 -123456789.000000000 123456789.123460000 -123456789.123460000 123500000.000000000 -123500000.000000000 +123456789.123456789 -123456789.123456789 123456790.000000000 -123456789.000000000 123456789.123460000 -123456789.123450000 123500000.000000000 -123400000.000000000 +123456789.123456789 -123456789.123456789 123456789.000000000 -123456790.000000000 123456789.123450000 -123456789.123460000 123400000.000000000 -123500000.000000000 +123456789.123456789 -123456789.123456789 123456789.000000000 -123456789.000000000 123456789.123450000 -123456789.123450000 123400000.000000000 -123400000.000000000 +12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123456789.123000000 -12345678901234567890123456789.123000000 +12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123456789.123000000 -12345678901234567890123456789.123000000 +12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456790.000000000 -12345678901234567890123456789.000000000 12345678901234567890123456789.124000000 -12345678901234567890123456789.123000000 +12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456790.000000000 12345678901234567890123456789.123000000 -12345678901234567890123456789.124000000 +12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123456789.123000000 -12345678901234567890123456789.123000000 +12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123457000.000000000 -12345678901234567890123457000.000000000 +12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123457000.000000000 -12345678901234567890123457000.000000000 +12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456790.000000000 -12345678901234567890123456789.000000000 12345678901234567890123457000.000000000 -12345678901234567890123456000.000000000 +12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456790.000000000 12345678901234567890123456000.000000000 -12345678901234567890123457000.000000000 +12345678901234567890123456789.123456789 -12345678901234567890123456789.123456789 12345678901234567890123456789.000000000 -12345678901234567890123456789.000000000 12345678901234567890123456000.000000000 -12345678901234567890123456000.000000000 diff --git a/tests/queries/0_stateless/00700_decimal_round.sql b/tests/queries/0_stateless/00700_decimal_round.sql index 318a7718de9..c5b8dbb520b 100644 --- a/tests/queries/0_stateless/00700_decimal_round.sql +++ b/tests/queries/0_stateless/00700_decimal_round.sql @@ -61,20 +61,20 @@ SELECT toDecimal128(-12345.6789, 4) AS x, ceil(x, -1), ceil(x, -2), ceil(x, -3), SELECT toDecimal128(-12345.6789, 4) AS x, floor(x, -1), floor(x, -2), floor(x, -3), floor(x, -4), floor(x, -5); SELECT toDecimal128(-12345.6789, 4) AS x, trunc(x, -1), trunc(x, -2), trunc(x, -3), trunc(x, -4), trunc(x, -5); -SELECT toDecimal64(123456789.123456789, 9) AS x, -x AS y, round(x), round(y), round(x, 5), round(y, 5), round(x, -5), round(y, -5); -SELECT toDecimal64(123456789.123456789, 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, 5), roundBankers(y, 5), roundBankers(x, -5), roundBankers(y, -5); -SELECT toDecimal64(123456789.123456789, 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, 5), ceil(y, 5), ceil(x, -5), ceil(y, -5); -SELECT toDecimal64(123456789.123456789, 9) AS x, -x AS y, floor(x), floor(y), floor(x, 5), floor(y, 5), floor(x, -5), floor(y, -5); -SELECT toDecimal64(123456789.123456789, 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, 5), trunc(y, 5), trunc(x, -5), trunc(y, -5); +SELECT toDecimal64('123456789.123456789', 9) AS x, -x AS y, round(x), round(y), round(x, 5), round(y, 5), round(x, -5), round(y, -5); +SELECT toDecimal64('123456789.123456789', 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, 5), roundBankers(y, 5), roundBankers(x, -5), roundBankers(y, -5); +SELECT toDecimal64('123456789.123456789', 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, 5), ceil(y, 5), ceil(x, -5), ceil(y, -5); +SELECT toDecimal64('123456789.123456789', 9) AS x, -x AS y, floor(x), floor(y), floor(x, 5), floor(y, 5), floor(x, -5), floor(y, -5); +SELECT toDecimal64('123456789.123456789', 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, 5), trunc(y, 5), trunc(x, -5), trunc(y, -5); -SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, round(x), round(y), round(x, 3), round(y, 3); -SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, 3), roundBankers(y, 3); -SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, 3), ceil(y, 3); -SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, floor(x), floor(y), floor(x, 3), floor(y, 3); -SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, 3), trunc(y, 3); +SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, round(x), round(y), round(x, 3), round(y, 3); +SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, 3), roundBankers(y, 3); +SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, 3), ceil(y, 3); +SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, floor(x), floor(y), floor(x, 3), floor(y, 3); +SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, 3), trunc(y, 3); -SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, round(x), round(y), round(x, -3), round(y, -3); -SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, -3), roundBankers(y, -3); -SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, -3), ceil(y, -3); -SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, floor(x), floor(y), floor(x, -3), floor(y, -3); -SELECT toDecimal128(12345678901234567890123456789.123456789, 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, -3), trunc(y, -3); +SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, round(x), round(y), round(x, -3), round(y, -3); +SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, roundBankers(x), roundBankers(y), roundBankers(x, -3), roundBankers(y, -3); +SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, ceil(x), ceil(y), ceil(x, -3), ceil(y, -3); +SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, floor(x), floor(y), floor(x, -3), floor(y, -3); +SELECT toDecimal128('12345678901234567890123456789.123456789', 9) AS x, -x AS y, trunc(x), trunc(y), trunc(x, -3), trunc(y, -3);