mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Remove REAl and INT8, add some tests
This commit is contained in:
parent
1ceabf1e10
commit
dc4af074b2
@ -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.
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user