fix clang-tidy and test

This commit is contained in:
Anton Popov 2024-03-21 15:29:11 +00:00
parent d25d8869e2
commit d1d7277802
3 changed files with 11 additions and 11 deletions

View File

@ -67,7 +67,7 @@ template <typename Value, bool nullable> struct LastElementCache;
template <typename Value> template <typename Value>
struct LastElementCache<Value, true> : public LastElementCacheBase struct LastElementCache<Value, true> : public LastElementCacheBase
{ {
Value value; Value value{};
bool is_null = false; bool is_null = false;
template <typename Key> template <typename Key>
@ -79,7 +79,7 @@ struct LastElementCache<Value, true> : public LastElementCacheBase
template <typename Value> template <typename Value>
struct LastElementCache<Value, false> : public LastElementCacheBase struct LastElementCache<Value, false> : public LastElementCacheBase
{ {
Value value; Value value{};
template <typename Key> template <typename Key>
bool check(const Key & key) const { return value.first == key; } bool check(const Key & key) const { return value.first == key; }

View File

@ -1,13 +1,13 @@
\N 1 1
1 2 0 1 2 0
\N 1 1 \N 1 1
1 2 0 1 2 0
\N 1 1
\N 3 3 \N 3 3
1 3 0 1 3 0
\N 1 1
1 2 0 1 2 0
\N 2 2 \N 1 1
1 1 0 1 1 0
\N 2 2
t_nullable_keys_1 0 t_nullable_keys_1 0
t_nullable_keys_2 0 t_nullable_keys_2 0
t_nullable_keys_3 1 t_nullable_keys_3 1

View File

@ -2,7 +2,7 @@ DROP TABLE IF EXISTS t_nullable_keys_1;
CREATE TABLE t_nullable_keys_1 (x Nullable(Int64)) ENGINE = Memory; CREATE TABLE t_nullable_keys_1 (x Nullable(Int64)) ENGINE = Memory;
INSERT INTO t_nullable_keys_1 VALUES (1), (1), (NULL); 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; 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; CREATE TABLE t_nullable_keys_2 (x Nullable(Int64)) ENGINE = Memory;
INSERT INTO t_nullable_keys_2 VALUES (NULL), (1), (1); 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; 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; CREATE TABLE t_nullable_keys_3 (x Nullable(Int64)) ENGINE = Memory;
INSERT INTO t_nullable_keys_3 VALUES (NULL), (NULL), (NULL); 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; 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; CREATE TABLE t_nullable_keys_4 (x Nullable(Int64)) ENGINE = Memory;
INSERT INTO t_nullable_keys_4 VALUES (1), (1), (1); 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; 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; CREATE TABLE t_nullable_keys_5 (x Nullable(Int64)) ENGINE = Memory;
INSERT INTO t_nullable_keys_5 VALUES (1), (NULL), (1); 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; 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; CREATE TABLE t_nullable_keys_6 (x Nullable(Int64)) ENGINE = Memory;
INSERT INTO t_nullable_keys_6 VALUES (NULL), (1), (NULL); 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; DROP TABLE t_nullable_keys_6;