ClickHouse/tests/queries/0_stateless/01072_nullable_jit.sql

21 lines
411 B
MySQL
Raw Normal View History

2021-05-25 08:50:40 +00:00
SET compile_expressions = 1;
2020-01-30 11:21:59 +00:00
DROP TABLE IF EXISTS foo;
CREATE TABLE foo (
id UInt32,
a Float64,
b Float64,
c Float64,
d Float64
) Engine = MergeTree()
PARTITION BY id
ORDER BY id;
INSERT INTO foo VALUES (1, 0.5, 0.2, 0.3, 0.8);
2021-05-25 08:50:40 +00:00
SELECT divide(sum(a) + sum(b), nullIf(sum(c) + sum(d), 0)) FROM foo;
SELECT divide(sum(a) + sum(b), nullIf(sum(c) + sum(d), 0)) FROM foo;
2020-01-30 11:21:59 +00:00
DROP TABLE foo;