This commit is contained in:
potya 2020-05-13 18:49:17 +03:00
parent a6ea36162c
commit 1ceabf1e10
5 changed files with 13 additions and 8 deletions

View File

@ -181,6 +181,7 @@ void registerDataTypeDecimal(DataTypeFactory & factory)
factory.registerAlias("DEC", "Decimal", DataTypeFactory::CaseInsensitive); factory.registerAlias("DEC", "Decimal", DataTypeFactory::CaseInsensitive);
factory.registerAlias("NUMERIC", "Decimal", DataTypeFactory::CaseInsensitive); factory.registerAlias("NUMERIC", "Decimal", DataTypeFactory::CaseInsensitive);
factory.registerAlias("FIXED", "Decimal", DataTypeFactory::CaseInsensitive); factory.registerAlias("FIXED", "Decimal", DataTypeFactory::CaseInsensitive);
factory.registerAlias("REAL", "Decimal32", DataTypeFactory::CaseInsensitive);
} }
/// Explicit template instantiations. /// Explicit template instantiations.

View File

@ -32,7 +32,6 @@ void registerDataTypeNumbers(DataTypeFactory & factory)
factory.registerAlias("INT4", "Int32", DataTypeFactory::CaseInsensitive); factory.registerAlias("INT4", "Int32", DataTypeFactory::CaseInsensitive);
factory.registerAlias("INTEGER", "Int32", DataTypeFactory::CaseInsensitive); factory.registerAlias("INTEGER", "Int32", DataTypeFactory::CaseInsensitive);
factory.registerAlias("BIGINT", "Int64", DataTypeFactory::CaseInsensitive); factory.registerAlias("BIGINT", "Int64", DataTypeFactory::CaseInsensitive);
factory.registerAlias("INT8", "Int64", DataTypeFactory::CaseInsensitive);
factory.registerAlias("FLOAT", "Float32", DataTypeFactory::CaseInsensitive); factory.registerAlias("FLOAT", "Float32", DataTypeFactory::CaseInsensitive);
factory.registerAlias("DOUBLE", "Float64", DataTypeFactory::CaseInsensitive); factory.registerAlias("DOUBLE", "Float64", DataTypeFactory::CaseInsensitive);
} }

View File

@ -2280,8 +2280,6 @@ void InterpreterSelectQuery::executeUnion(Pipeline & pipeline, Block header)
pipeline.streams.push_back(pipeline.stream_with_non_joined_data); pipeline.streams.push_back(pipeline.stream_with_non_joined_data);
pipeline.stream_with_non_joined_data = nullptr; pipeline.stream_with_non_joined_data = nullptr;
} }
} }

View File

@ -121,7 +121,6 @@ InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(
} }
options.ignore_limits |= all_nested_ignore_limits; options.ignore_limits |= all_nested_ignore_limits;
options.ignore_quota |= all_nested_ignore_quota; options.ignore_quota |= all_nested_ignore_quota;
} }

View File

@ -11,12 +11,20 @@ CREATE TABLE IF NOT EXISTS decimal
g Decimal(9, 3), g Decimal(9, 3),
h decimal(18, 9), h decimal(18, 9),
i deciMAL(38, 18), i deciMAL(38, 18),
j dec(4,2) j dec(4,2),
k NumEriC(4, 23),
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)
) ENGINE = Memory; ) ENGINE = Memory;
INSERT INTO decimal (a, b, c, d, e, f, g, h, i, j) VALUES (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 (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) VALUES (42, 42, 42, 0.42, 0.42, 0.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) VALUES (-42, -42, -42, -0.42, -0.42, -0.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);
SELECT a + a, a - a, a * a, a / a, intDiv(a, a), intDivOrZero(a, a) FROM decimal WHERE a = 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; SELECT b + b, b - b, b * b, b / b, intDiv(b, b), intDivOrZero(b, b) FROM decimal WHERE b = 42;