mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
fix clang-tidy and test
This commit is contained in:
parent
d25d8869e2
commit
d1d7277802
@ -67,7 +67,7 @@ template <typename Value, bool nullable> struct LastElementCache;
|
||||
template <typename Value>
|
||||
struct LastElementCache<Value, true> : public LastElementCacheBase
|
||||
{
|
||||
Value value;
|
||||
Value value{};
|
||||
bool is_null = false;
|
||||
|
||||
template <typename Key>
|
||||
@ -79,7 +79,7 @@ struct LastElementCache<Value, true> : public LastElementCacheBase
|
||||
template <typename Value>
|
||||
struct LastElementCache<Value, false> : public LastElementCacheBase
|
||||
{
|
||||
Value value;
|
||||
Value value{};
|
||||
|
||||
template <typename Key>
|
||||
bool check(const Key & key) const { return value.first == key; }
|
||||
|
@ -1,13 +1,13 @@
|
||||
\N 1 1
|
||||
1 2 0
|
||||
\N 1 1
|
||||
1 2 0
|
||||
\N 1 1
|
||||
\N 3 3
|
||||
1 3 0
|
||||
\N 1 1
|
||||
1 2 0
|
||||
\N 2 2
|
||||
\N 1 1
|
||||
1 1 0
|
||||
\N 2 2
|
||||
t_nullable_keys_1 0
|
||||
t_nullable_keys_2 0
|
||||
t_nullable_keys_3 1
|
||||
|
@ -2,7 +2,7 @@ DROP TABLE IF EXISTS t_nullable_keys_1;
|
||||
|
||||
CREATE TABLE t_nullable_keys_1 (x Nullable(Int64)) ENGINE = Memory;
|
||||
INSERT INTO t_nullable_keys_1 VALUES (1), (1), (NULL);
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_1 GROUP BY x;
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_1 GROUP BY x ORDER BY x;
|
||||
|
||||
DROP TABLE t_nullable_keys_1;
|
||||
|
||||
@ -10,7 +10,7 @@ DROP TABLE IF EXISTS t_nullable_keys_2;
|
||||
|
||||
CREATE TABLE t_nullable_keys_2 (x Nullable(Int64)) ENGINE = Memory;
|
||||
INSERT INTO t_nullable_keys_2 VALUES (NULL), (1), (1);
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_2 GROUP BY x;
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_2 GROUP BY x ORDER BY x;
|
||||
|
||||
DROP TABLE t_nullable_keys_2;
|
||||
|
||||
@ -18,7 +18,7 @@ DROP TABLE IF EXISTS t_nullable_keys_3;
|
||||
|
||||
CREATE TABLE t_nullable_keys_3 (x Nullable(Int64)) ENGINE = Memory;
|
||||
INSERT INTO t_nullable_keys_3 VALUES (NULL), (NULL), (NULL);
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_3 GROUP BY x;
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_3 GROUP BY x ORDER BY x;
|
||||
|
||||
DROP TABLE t_nullable_keys_3;
|
||||
|
||||
@ -26,7 +26,7 @@ DROP TABLE IF EXISTS t_nullable_keys_4;
|
||||
|
||||
CREATE TABLE t_nullable_keys_4 (x Nullable(Int64)) ENGINE = Memory;
|
||||
INSERT INTO t_nullable_keys_4 VALUES (1), (1), (1);
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_4 GROUP BY x;
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_4 GROUP BY x ORDER BY x;
|
||||
|
||||
DROP TABLE t_nullable_keys_4;
|
||||
|
||||
@ -34,7 +34,7 @@ DROP TABLE IF EXISTS t_nullable_keys_5;
|
||||
|
||||
CREATE TABLE t_nullable_keys_5 (x Nullable(Int64)) ENGINE = Memory;
|
||||
INSERT INTO t_nullable_keys_5 VALUES (1), (NULL), (1);
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_5 GROUP BY x;
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_5 GROUP BY x ORDER BY x;
|
||||
|
||||
DROP TABLE t_nullable_keys_5;
|
||||
|
||||
@ -42,7 +42,7 @@ DROP TABLE IF EXISTS t_nullable_keys_6;
|
||||
|
||||
CREATE TABLE t_nullable_keys_6 (x Nullable(Int64)) ENGINE = Memory;
|
||||
INSERT INTO t_nullable_keys_6 VALUES (NULL), (1), (NULL);
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_6 GROUP BY x;
|
||||
SELECT x, count(), countIf(x IS NULL) FROM t_nullable_keys_6 GROUP BY x ORDER BY x;
|
||||
|
||||
DROP TABLE t_nullable_keys_6;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user