From dc4af074b2e58194bad6b2d9d6377f16e9e4b7f5 Mon Sep 17 00:00:00 2001 From: potya Date: Thu, 14 May 2020 17:11:59 +0300 Subject: [PATCH] Remove REAl and INT8, add some tests --- src/DataTypes/DataTypesDecimal.cpp | 1 - tests/queries/0_stateless/00700_decimal_arithm.sql | 11 ++++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/DataTypes/DataTypesDecimal.cpp b/src/DataTypes/DataTypesDecimal.cpp index 400cd30d969..2586f54dc87 100644 --- a/src/DataTypes/DataTypesDecimal.cpp +++ b/src/DataTypes/DataTypesDecimal.cpp @@ -181,7 +181,6 @@ void registerDataTypeDecimal(DataTypeFactory & factory) factory.registerAlias("DEC", "Decimal", DataTypeFactory::CaseInsensitive); factory.registerAlias("NUMERIC", "Decimal", DataTypeFactory::CaseInsensitive); factory.registerAlias("FIXED", "Decimal", DataTypeFactory::CaseInsensitive); - factory.registerAlias("REAL", "Decimal32", DataTypeFactory::CaseInsensitive); } /// Explicit template instantiations. diff --git a/tests/queries/0_stateless/00700_decimal_arithm.sql b/tests/queries/0_stateless/00700_decimal_arithm.sql index f456fcdf807..1331ae2800c 100644 --- a/tests/queries/0_stateless/00700_decimal_arithm.sql +++ b/tests/queries/0_stateless/00700_decimal_arithm.sql @@ -16,15 +16,12 @@ CREATE TABLE IF NOT EXISTS decimal l numeric(3,9), m NUMEric(18, 9), n FixED(12, 6), - o fixed(8, 6), - p real(3, 1), - q REal(28, 12), - r real(9, 9) + o fixed(8, 6) ) ENGINE = Memory; -INSERT INTO decimal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) VALUES (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,); -INSERT INTO decimal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) VALUES (42, 42, 42, 0.42, 0.42, 0.42, 42.42, 42.42, 42.42, 42.42, 42.42, 42.42, 42.42, 42.42, 42.42, 42.42, 42.42, 42.42); -INSERT INTO decimal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) VALUES (-42, -42, -42, -0.42, -0.42, -0.42, -42.42, -42.42, -42.42, -42.42, -42.42, -42.42, -42.42, -42.42, -42.42, -42.42, -42.42, -42.42); +INSERT INTO decimal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) VALUES (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO decimal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) VALUES (42, 42, 42, 0.42, 0.42, 0.42, 42.42, 42.42, 42.42, 42.42, 42.42, 42.42, 42.42, 42.42, 42.42); +INSERT INTO decimal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) VALUES (-42, -42, -42, -0.42, -0.42, -0.42, -42.42, -42.42, -42.42, -42.42, -42.42, -42.42, -42.42, -42.42, -42.42); SELECT a + a, a - a, a * a, a / a, intDiv(a, a), intDivOrZero(a, a) FROM decimal WHERE a = 42; SELECT b + b, b - b, b * b, b / b, intDiv(b, b), intDivOrZero(b, b) FROM decimal WHERE b = 42;