This commit is contained in:
Nikolai Kochetov 2021-04-20 14:57:52 +03:00
parent 5e589ca6b2
commit 03273cad9c
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,20 @@
drop table if exists t0;
CREATE TABLE t0 (c0 String) ENGINE = Log();
SELECT isNull(t0.c0) OR COUNT('\n?pVa')
FROM t0
GROUP BY t0.c0
HAVING isNull(t0.c0)
UNION ALL
SELECT isNull(t0.c0) OR COUNT('\n?pVa')
FROM t0
GROUP BY t0.c0
HAVING NOT isNull(t0.c0)
UNION ALL
SELECT isNull(t0.c0) OR COUNT('\n?pVa')
FROM t0
GROUP BY t0.c0
HAVING isNull(isNull(t0.c0))
SETTINGS aggregate_functions_null_for_empty = 1, enable_optimize_predicate_expression = 0;
drop table if exists t0;