diff --git a/dbms/tests/queries/0_stateless/00004_shard_format_ast_and_remote_table.sql b/dbms/tests/queries/0_stateless/00004_shard_format_ast_and_remote_table.sql index dd20fd1d8e4..defbf1aabc9 100644 --- a/dbms/tests/queries/0_stateless/00004_shard_format_ast_and_remote_table.sql +++ b/dbms/tests/queries/0_stateless/00004_shard_format_ast_and_remote_table.sql @@ -1 +1 @@ -SELECT (dummy AS x) - 1 FROM remote('127.0.0.{1,2}', system, one) +SELECT (dummy AS x) - 1 FROM remote('127.0.0.{2,3}', system, one) diff --git a/dbms/tests/queries/0_stateless/00005_shard_format_ast_and_remote_table_lambda.sql b/dbms/tests/queries/0_stateless/00005_shard_format_ast_and_remote_table_lambda.sql index fb401df5184..f9d1380bae4 100644 --- a/dbms/tests/queries/0_stateless/00005_shard_format_ast_and_remote_table_lambda.sql +++ b/dbms/tests/queries/0_stateless/00005_shard_format_ast_and_remote_table_lambda.sql @@ -1 +1 @@ -SELECT count() FROM remote('127.0.0.{1,2}', system, one) WHERE arrayExists((x) -> x = 1, [1, 2, 3]) +SELECT count() FROM remote('127.0.0.{2,3}', system, one) WHERE arrayExists((x) -> x = 1, [1, 2, 3]) diff --git a/dbms/tests/queries/0_stateless/00019_shard_quantiles_totals_distributed.sql b/dbms/tests/queries/0_stateless/00019_shard_quantiles_totals_distributed.sql index 85965f4d8f6..b7e672a32b6 100644 --- a/dbms/tests/queries/0_stateless/00019_shard_quantiles_totals_distributed.sql +++ b/dbms/tests/queries/0_stateless/00019_shard_quantiles_totals_distributed.sql @@ -1 +1 @@ -SELECT quantilesTiming(0.1, 0.5, 0.9)(dummy) FROM remote('127.0.0.{1,2}', system, one) GROUP BY 1 WITH TOTALS +SELECT quantilesTiming(0.1, 0.5, 0.9)(dummy) FROM remote('127.0.0.{2,3}', system, one) GROUP BY 1 WITH TOTALS diff --git a/dbms/tests/queries/0_stateless/00026_shard_something_distributed.sql b/dbms/tests/queries/0_stateless/00026_shard_something_distributed.sql index 0ab06a36497..aff6d02c1ed 100644 --- a/dbms/tests/queries/0_stateless/00026_shard_something_distributed.sql +++ b/dbms/tests/queries/0_stateless/00026_shard_something_distributed.sql @@ -1 +1 @@ -SELECT NOT dummy FROM remote('127.0.0.{1,2}', system, one) WHERE NOT dummy +SELECT NOT dummy FROM remote('127.0.0.{2,3}', system, one) WHERE NOT dummy diff --git a/dbms/tests/queries/0_stateless/00028_shard_big_agg_aj_distributed.sql b/dbms/tests/queries/0_stateless/00028_shard_big_agg_aj_distributed.sql index 5ddbef2245b..b92eeffc83a 100644 --- a/dbms/tests/queries/0_stateless/00028_shard_big_agg_aj_distributed.sql +++ b/dbms/tests/queries/0_stateless/00028_shard_big_agg_aj_distributed.sql @@ -3,4 +3,4 @@ DROP TABLE IF EXISTS test.big_array; CREATE TABLE test.big_array (x Array(UInt8)) ENGINE=TinyLog; SET min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0; INSERT INTO test.big_array SELECT groupArray(number % 255) AS x FROM (SELECT * FROM system.numbers LIMIT 1000000); -SELECT sum(y) AS s FROM remote('127.0.0.{1,2}', test, big_array) ARRAY JOIN x AS y; +SELECT sum(y) AS s FROM remote('127.0.0.{2,3}', test, big_array) ARRAY JOIN x AS y; diff --git a/dbms/tests/queries/0_stateless/00028_shard_big_non_agg_aj_distributed.sql b/dbms/tests/queries/0_stateless/00028_shard_big_non_agg_aj_distributed.sql index f7d11b46c88..94414f1d3a6 100644 --- a/dbms/tests/queries/0_stateless/00028_shard_big_non_agg_aj_distributed.sql +++ b/dbms/tests/queries/0_stateless/00028_shard_big_non_agg_aj_distributed.sql @@ -1,2 +1,2 @@ -SELECT sum(s) FROM (SELECT y AS s FROM remote('127.0.0.{1,2}', test, big_array) ARRAY JOIN x AS y); +SELECT sum(s) FROM (SELECT y AS s FROM remote('127.0.0.{2,3}', test, big_array) ARRAY JOIN x AS y); DROP TABLE test.big_array; diff --git a/dbms/tests/queries/0_stateless/00059_shard_global_in.sql b/dbms/tests/queries/0_stateless/00059_shard_global_in.sql index 4f766e62e7b..4da93e0a14a 100644 --- a/dbms/tests/queries/0_stateless/00059_shard_global_in.sql +++ b/dbms/tests/queries/0_stateless/00059_shard_global_in.sql @@ -1 +1 @@ -SELECT number FROM remote('127.0.0.{1,2}', system, numbers) WHERE number GLOBAL IN (SELECT number FROM remote('127.0.0.{1,2}', system, numbers) WHERE number % 2 = 1 LIMIT 10) LIMIT 10; +SELECT number FROM remote('127.0.0.{2,3}', system, numbers) WHERE number GLOBAL IN (SELECT number FROM remote('127.0.0.{2,3}', system, numbers) WHERE number % 2 = 1 LIMIT 10) LIMIT 10; diff --git a/dbms/tests/queries/0_stateless/00065_shard_float_literals_formatting.sql b/dbms/tests/queries/0_stateless/00065_shard_float_literals_formatting.sql index 0b3bffdcf9d..2c3f0dfb0e3 100644 --- a/dbms/tests/queries/0_stateless/00065_shard_float_literals_formatting.sql +++ b/dbms/tests/queries/0_stateless/00065_shard_float_literals_formatting.sql @@ -1 +1 @@ -SELECT toTypeName(1.0) FROM remote('127.0.0.{1,2}', system, one) +SELECT toTypeName(1.0) FROM remote('127.0.0.{2,3}', system, one) diff --git a/dbms/tests/queries/0_stateless/00075_shard_formatting_negate_of_negative_literal.sql b/dbms/tests/queries/0_stateless/00075_shard_formatting_negate_of_negative_literal.sql index f68219816c5..351f18ef4bd 100644 --- a/dbms/tests/queries/0_stateless/00075_shard_formatting_negate_of_negative_literal.sql +++ b/dbms/tests/queries/0_stateless/00075_shard_formatting_negate_of_negative_literal.sql @@ -1 +1 @@ -SELECT -(-1) FROM remote('127.0.0.{1,2}', system, one) +SELECT -(-1) FROM remote('127.0.0.{2,3}', system, one) diff --git a/dbms/tests/queries/0_stateless/00098_shard_i_union_all.sql b/dbms/tests/queries/0_stateless/00098_shard_i_union_all.sql index 8080292ad70..1780d575e8f 100644 --- a/dbms/tests/queries/0_stateless/00098_shard_i_union_all.sql +++ b/dbms/tests/queries/0_stateless/00098_shard_i_union_all.sql @@ -7,7 +7,7 @@ CREATE TABLE test.report2(id UInt32, event_date Date, priority UInt32, descripti INSERT INTO test.report1(id,event_date,priority,description) VALUES (1, '2015-01-01', 1, 'foo')(2, '2015-02-01', 2, 'bar')(3, '2015-03-01', 3, 'foo')(4, '2015-04-01', 4, 'bar')(5, '2015-05-01', 5, 'foo'); INSERT INTO test.report2(id,event_date,priority,description) VALUES (1, '2016-01-01', 6, 'bar')(2, '2016-02-01', 7, 'foo')(3, '2016-03-01', 8, 'bar')(4, '2016-04-01', 9, 'foo')(5, '2016-05-01', 10, 'bar'); -SELECT * FROM (SELECT id, event_date, priority, description FROM remote('127.0.0.{1,2}', test, report1) UNION ALL SELECT id, event_date, priority, description FROM remote('127.0.0.{1,2}', test, report2)) ORDER BY id, event_date ASC; +SELECT * FROM (SELECT id, event_date, priority, description FROM remote('127.0.0.{2,3}', test, report1) UNION ALL SELECT id, event_date, priority, description FROM remote('127.0.0.{2,3}', test, report2)) ORDER BY id, event_date ASC; DROP TABLE test.report1; DROP TABLE test.report2; diff --git a/dbms/tests/queries/0_stateless/00105_shard_collations.sql b/dbms/tests/queries/0_stateless/00105_shard_collations.sql index beb55d90d89..174992419e2 100644 --- a/dbms/tests/queries/0_stateless/00105_shard_collations.sql +++ b/dbms/tests/queries/0_stateless/00105_shard_collations.sql @@ -1,6 +1,6 @@ SELECT arrayJoin(['а', 'я', 'ё', 'А', 'Я', 'Ё']) AS x ORDER BY x; SELECT arrayJoin(['а', 'я', 'ё', 'А', 'Я', 'Ё']) AS x ORDER BY x COLLATE 'ru'; -SELECT arrayJoin(['а', 'я', 'ё', 'А', 'Я', 'Ё']) AS x FROM remote('127.0.0.{1,2}', system, one) ORDER BY x COLLATE 'ru'; +SELECT arrayJoin(['а', 'я', 'ё', 'А', 'Я', 'Ё']) AS x FROM remote('127.0.0.{2,3}', system, one) ORDER BY x COLLATE 'ru'; SELECT arrayJoin(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'ç', 'd', 'e', 'f', 'g', 'ğ', 'h', 'ı', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'ö', 'p', 'r', 's', 'ş', 't', 'u', 'ü', 'v', 'y', 'z', 'A', 'B', 'C', 'Ç', 'D', 'E', 'F', 'G', 'Ğ', 'H', 'I', 'İ', 'J', 'K', 'L', 'M', 'N', 'O', 'Ö', 'P', 'R', 'S', 'Ş', 'T', 'U', 'Ü', 'V', 'Y', 'Z']) AS x ORDER BY x; SELECT arrayJoin(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'ç', 'd', 'e', 'f', 'g', 'ğ', 'h', 'ı', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'ö', 'p', 'r', 's', 'ş', 't', 'u', 'ü', 'v', 'y', 'z', 'A', 'B', 'C', 'Ç', 'D', 'E', 'F', 'G', 'Ğ', 'H', 'I', 'İ', 'J', 'K', 'L', 'M', 'N', 'O', 'Ö', 'P', 'R', 'S', 'Ş', 'T', 'U', 'Ü', 'V', 'Y', 'Z']) AS x ORDER BY x COLLATE 'tr'; SELECT x, n FROM (SELECT ['а', 'я', 'ё', 'А', 'Я', 'Ё'] AS arr) ARRAY JOIN arr AS x, arrayEnumerate(arr) AS n ORDER BY x COLLATE 'ru', n; diff --git a/dbms/tests/queries/0_stateless/00108_shard_totals_after_having.sql b/dbms/tests/queries/0_stateless/00108_shard_totals_after_having.sql index 30b527da2ad..37825b269f7 100644 --- a/dbms/tests/queries/0_stateless/00108_shard_totals_after_having.sql +++ b/dbms/tests/queries/0_stateless/00108_shard_totals_after_having.sql @@ -2,13 +2,13 @@ SET max_rows_to_group_by = 100000; SET group_by_overflow_mode = 'any'; SET totals_mode = 'after_having_auto'; -SELECT dummy, count() FROM remote('127.0.0.{1,2}', system, one) GROUP BY dummy WITH TOTALS; +SELECT dummy, count() FROM remote('127.0.0.{2,3}', system, one) GROUP BY dummy WITH TOTALS; SET totals_mode = 'after_having_inclusive'; -SELECT dummy, count() FROM remote('127.0.0.{1,2}', system, one) GROUP BY dummy WITH TOTALS; +SELECT dummy, count() FROM remote('127.0.0.{2,3}', system, one) GROUP BY dummy WITH TOTALS; SET totals_mode = 'after_having_exclusive'; -SELECT dummy, count() FROM remote('127.0.0.{1,2}', system, one) GROUP BY dummy WITH TOTALS; +SELECT dummy, count() FROM remote('127.0.0.{2,3}', system, one) GROUP BY dummy WITH TOTALS; SET totals_mode = 'before_having'; -SELECT dummy, count() FROM remote('127.0.0.{1,2}', system, one) GROUP BY dummy WITH TOTALS; +SELECT dummy, count() FROM remote('127.0.0.{2,3}', system, one) GROUP BY dummy WITH TOTALS; diff --git a/dbms/tests/queries/0_stateless/00109_shard_totals_after_having.sql b/dbms/tests/queries/0_stateless/00109_shard_totals_after_having.sql index 06fd5859a83..98d0cc5a69f 100644 --- a/dbms/tests/queries/0_stateless/00109_shard_totals_after_having.sql +++ b/dbms/tests/queries/0_stateless/00109_shard_totals_after_having.sql @@ -6,15 +6,15 @@ DROP TABLE IF EXISTS test.numbers500k; CREATE VIEW test.numbers500k AS SELECT number FROM system.numbers LIMIT 500000; SET totals_mode = 'after_having_auto'; -SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM remote('127.0.0.{1,2}', test, numbers500k) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; +SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM remote('127.0.0.{2,3}', test, numbers500k) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; SET totals_mode = 'after_having_inclusive'; -SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM remote('127.0.0.{1,2}', test, numbers500k) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; +SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM remote('127.0.0.{2,3}', test, numbers500k) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; SET totals_mode = 'after_having_exclusive'; -SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM remote('127.0.0.{1,2}', test, numbers500k) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; +SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM remote('127.0.0.{2,3}', test, numbers500k) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; SET totals_mode = 'before_having'; -SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM remote('127.0.0.{1,2}', test, numbers500k) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; +SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM remote('127.0.0.{2,3}', test, numbers500k) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; DROP TABLE test.numbers500k; diff --git a/dbms/tests/queries/0_stateless/00111_shard_external_sort_distributed.sql b/dbms/tests/queries/0_stateless/00111_shard_external_sort_distributed.sql index d8e104f291e..c32cd588175 100644 --- a/dbms/tests/queries/0_stateless/00111_shard_external_sort_distributed.sql +++ b/dbms/tests/queries/0_stateless/00111_shard_external_sort_distributed.sql @@ -4,6 +4,6 @@ SET max_bytes_before_external_sort = 10000000; DROP TABLE IF EXISTS test.numbers10m; CREATE VIEW test.numbers10m AS SELECT number FROM system.numbers LIMIT 10000000; -SELECT number FROM remote('127.0.0.{1,2}', test, numbers10m) ORDER BY number * 1234567890123456789 LIMIT 19999980, 20; +SELECT number FROM remote('127.0.0.{2,3}', test, numbers10m) ORDER BY number * 1234567890123456789 LIMIT 19999980, 20; DROP TABLE test.numbers10m; diff --git a/dbms/tests/queries/0_stateless/00112_shard_totals_after_having.sql b/dbms/tests/queries/0_stateless/00112_shard_totals_after_having.sql index 4b1d756c39a..bea0bd36ef2 100644 --- a/dbms/tests/queries/0_stateless/00112_shard_totals_after_having.sql +++ b/dbms/tests/queries/0_stateless/00112_shard_totals_after_having.sql @@ -1,4 +1,4 @@ SET totals_mode = 'after_having_auto'; SET max_rows_to_group_by = 100000; SET group_by_overflow_mode = 'any'; -SELECT dummy + 1 AS k, count() FROM remote('127.0.0.{1,2}', system, one) GROUP BY k WITH TOTALS ORDER BY k; +SELECT dummy + 1 AS k, count() FROM remote('127.0.0.{2,3}', system, one) GROUP BY k WITH TOTALS ORDER BY k; diff --git a/dbms/tests/queries/0_stateless/00113_shard_group_array.sql b/dbms/tests/queries/0_stateless/00113_shard_group_array.sql index 858e7f82ba6..b425891b735 100644 --- a/dbms/tests/queries/0_stateless/00113_shard_group_array.sql +++ b/dbms/tests/queries/0_stateless/00113_shard_group_array.sql @@ -13,9 +13,9 @@ SELECT count(), sum(toUInt64(ns)), max(toUInt64(ns)) FROM (SELECT intDiv(number, SELECT count(), sum(toUInt64(ns[1])), max(toUInt64(ns[1])), sum(toUInt64(ns[2]))/10 FROM (SELECT intDiv(number, 100) AS k, groupArray([toString(number), toString(number*10)]) AS ns FROM test.numbers_mt GROUP BY k) ARRAY JOIN ns; SELECT count(), sum(ns[1]), max(ns[1]), sum(ns[2])/10 FROM (SELECT intDiv(number, 100) AS k, groupArray([number, number*10]) AS ns FROM test.numbers_mt GROUP BY k) ARRAY JOIN ns; -SELECT count(), sum(ns), max(ns) FROM (SELECT intDiv(number, 100) AS k, groupArray(number) AS ns FROM remote('127.0.0.{1,2}', 'test', 'numbers_mt') GROUP BY k) ARRAY JOIN ns; -SELECT count(), sum(toUInt64(ns)), max(toUInt64(ns)) FROM (SELECT intDiv(number, 100) AS k, groupArray(toString(number)) AS ns FROM remote('127.0.0.{1,2}', 'test', 'numbers_mt') GROUP BY k) ARRAY JOIN ns; -SELECT count(), sum(toUInt64(ns[1])), max(toUInt64(ns[1])), sum(toUInt64(ns[2]))/10 FROM (SELECT intDiv(number, 100) AS k, groupArray([toString(number), toString(number*10)]) AS ns FROM remote('127.0.0.{1,2}', 'test', 'numbers_mt') GROUP BY k) ARRAY JOIN ns; +SELECT count(), sum(ns), max(ns) FROM (SELECT intDiv(number, 100) AS k, groupArray(number) AS ns FROM remote('127.0.0.{2,3}', 'test', 'numbers_mt') GROUP BY k) ARRAY JOIN ns; +SELECT count(), sum(toUInt64(ns)), max(toUInt64(ns)) FROM (SELECT intDiv(number, 100) AS k, groupArray(toString(number)) AS ns FROM remote('127.0.0.{2,3}', 'test', 'numbers_mt') GROUP BY k) ARRAY JOIN ns; +SELECT count(), sum(toUInt64(ns[1])), max(toUInt64(ns[1])), sum(toUInt64(ns[2]))/10 FROM (SELECT intDiv(number, 100) AS k, groupArray([toString(number), toString(number*10)]) AS ns FROM remote('127.0.0.{2,3}', 'test', 'numbers_mt') GROUP BY k) ARRAY JOIN ns; DROP TABLE test.numbers_mt; CREATE TABLE test.numbers_mt (number UInt64) ENGINE = Log; @@ -27,9 +27,9 @@ SELECT roundToExp2(number) AS k, length(groupArray(1)(hex(number) AS i)), length SELECT roundToExp2(number) AS k, length(groupArray(1)([hex(number)] AS i)), length(groupArray(1024)(i)), length(groupArray(65536)(i)) AS s FROM test.numbers_mt GROUP BY k ORDER BY k LIMIT 9, 11; SELECT ''; -SELECT roundToExp2(number) AS k, length(groupArray(1)(number AS i)), length(groupArray(1500)(i)), length(groupArray(70000)(i)) AS s FROM remote('127.0.0.{1,2}', 'test', 'numbers_mt') GROUP BY k ORDER BY k LIMIT 9, 11; -SELECT roundToExp2(number) AS k, length(groupArray(1)(hex(number) AS i)), length(groupArray(1500)(i)), length(groupArray(70000)(i)) AS s FROM remote('127.0.0.{1,2}', 'test', 'numbers_mt') GROUP BY k ORDER BY k LIMIT 9, 11; -SELECT roundToExp2(number) AS k, length(groupArray(1)([hex(number)] AS i)), length(groupArray(1500)(i)), length(groupArray(70000)(i)) AS s FROM remote('127.0.0.{1,2}', 'test', 'numbers_mt') GROUP BY k ORDER BY k LIMIT 9, 11; +SELECT roundToExp2(number) AS k, length(groupArray(1)(number AS i)), length(groupArray(1500)(i)), length(groupArray(70000)(i)) AS s FROM remote('127.0.0.{2,3}', 'test', 'numbers_mt') GROUP BY k ORDER BY k LIMIT 9, 11; +SELECT roundToExp2(number) AS k, length(groupArray(1)(hex(number) AS i)), length(groupArray(1500)(i)), length(groupArray(70000)(i)) AS s FROM remote('127.0.0.{2,3}', 'test', 'numbers_mt') GROUP BY k ORDER BY k LIMIT 9, 11; +SELECT roundToExp2(number) AS k, length(groupArray(1)([hex(number)] AS i)), length(groupArray(1500)(i)), length(groupArray(70000)(i)) AS s FROM remote('127.0.0.{2,3}', 'test', 'numbers_mt') GROUP BY k ORDER BY k LIMIT 9, 11; DROP TABLE test.numbers_mt; diff --git a/dbms/tests/queries/0_stateless/00115_shard_in_incomplete_result.sh b/dbms/tests/queries/0_stateless/00115_shard_in_incomplete_result.sh index e7b88487b09..cffe29b6a03 100755 --- a/dbms/tests/queries/0_stateless/00115_shard_in_incomplete_result.sh +++ b/dbms/tests/queries/0_stateless/00115_shard_in_incomplete_result.sh @@ -13,6 +13,6 @@ $CLICKHOUSE_CLIENT -n --query=" INSERT INTO test.users VALUES (1321770221388956068); "; -for i in {1..10}; do seq 1 10 | sed "s/.*/SELECT count() FROM (SELECT * FROM remote('127.0.0.{1,2}', test, users) WHERE UserID IN (SELECT arrayJoin([1468013291393583084, 1321770221388956068])));/" | $CLICKHOUSE_CLIENT -n | grep -vE '^4$' && echo 'Fail!' && break; echo -n '.'; done; echo +for i in {1..10}; do seq 1 10 | sed "s/.*/SELECT count() FROM (SELECT * FROM remote('127.0.0.{2,3}', test, users) WHERE UserID IN (SELECT arrayJoin([1468013291393583084, 1321770221388956068])));/" | $CLICKHOUSE_CLIENT -n | grep -vE '^4$' && echo 'Fail!' && break; echo -n '.'; done; echo $CLICKHOUSE_CLIENT --query="DROP TABLE test.users;"; diff --git a/dbms/tests/queries/0_stateless/00123_shard_unmerged_result_when_max_distributed_connections_is_one.sql b/dbms/tests/queries/0_stateless/00123_shard_unmerged_result_when_max_distributed_connections_is_one.sql index 2e944b43dae..396be0683d3 100644 --- a/dbms/tests/queries/0_stateless/00123_shard_unmerged_result_when_max_distributed_connections_is_one.sql +++ b/dbms/tests/queries/0_stateless/00123_shard_unmerged_result_when_max_distributed_connections_is_one.sql @@ -1,2 +1,2 @@ SET max_distributed_connections = 1; -SELECT count() + 1 FROM remote('127.0.0.{1,2}', system, one); +SELECT count() + 1 FROM remote('127.0.0.{2,3}', system, one); diff --git a/dbms/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql b/dbms/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql index 489c46eb8f2..9dfd1aadbd1 100644 --- a/dbms/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql +++ b/dbms/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql @@ -5,7 +5,7 @@ DROP TABLE IF EXISTS test.report; CREATE TABLE test.report(id UInt32, event_date Date, priority UInt32, description String) ENGINE = MergeTree(event_date, intHash32(id), (id, event_date, intHash32(id)), 8192); INSERT INTO test.report(id,event_date,priority,description) VALUES (1, '2015-01-01', 1, 'foo')(2, '2015-02-01', 2, 'bar')(3, '2015-03-01', 3, 'foo')(4, '2015-04-01', 4, 'bar')(5, '2015-05-01', 5, 'foo'); -SELECT * FROM (SELECT id, event_date, priority, description FROM remote('127.0.0.{1|2}', test, report)) ORDER BY id ASC; +SELECT * FROM (SELECT id, event_date, priority, description FROM remote('127.0.0.{2|3}', test, report)) ORDER BY id ASC; DROP TABLE test.report; diff --git a/dbms/tests/queries/0_stateless/00133_long_shard_memory_tracker_and_exception_safety.sh b/dbms/tests/queries/0_stateless/00133_long_shard_memory_tracker_and_exception_safety.sh index 93cff85703d..1c8bdaea6b5 100755 --- a/dbms/tests/queries/0_stateless/00133_long_shard_memory_tracker_and_exception_safety.sh +++ b/dbms/tests/queries/0_stateless/00133_long_shard_memory_tracker_and_exception_safety.sh @@ -15,7 +15,7 @@ fi for i in $(seq 1000000 $((20000 * $STEP_MULTIPLIER)) 10000000 && seq 10100000 $((100000 * $STEP_MULTIPLIER)) 20000000); do $CLICKHOUSE_CLIENT --max_memory_usage=$i --query=" - SELECT intDiv(number, 5) AS k, max(toString(number)) FROM remote('127.0.0.{1,2}', test.numbers_100k) GROUP BY k ORDER BY k LIMIT 1; + SELECT intDiv(number, 5) AS k, max(toString(number)) FROM remote('127.0.0.{2,3}', test.numbers_100k) GROUP BY k ORDER BY k LIMIT 1; " 2> /dev/null; CODE=$?; [ "$CODE" -ne "241" ] && [ "$CODE" -ne "0" ] && echo "Fail" && break; diff --git a/dbms/tests/queries/0_stateless/00154_shard_distributed_with_distinct.sql b/dbms/tests/queries/0_stateless/00154_shard_distributed_with_distinct.sql index 4ac10c1adc1..8f98cd6d62a 100644 --- a/dbms/tests/queries/0_stateless/00154_shard_distributed_with_distinct.sql +++ b/dbms/tests/queries/0_stateless/00154_shard_distributed_with_distinct.sql @@ -1 +1 @@ -SELECT DISTINCT number FROM remote('127.0.0.{1,2}', system.numbers) LIMIT 10 +SELECT DISTINCT number FROM remote('127.0.0.{2,3}', system.numbers) LIMIT 10 diff --git a/dbms/tests/queries/0_stateless/00167_shard_settings_inside_query.sql b/dbms/tests/queries/0_stateless/00167_shard_settings_inside_query.sql index c24375ded00..6a892987e39 100644 --- a/dbms/tests/queries/0_stateless/00167_shard_settings_inside_query.sql +++ b/dbms/tests/queries/0_stateless/00167_shard_settings_inside_query.sql @@ -1,3 +1,3 @@ SELECT min(number) FROM system.numbers WHERE toUInt64(number % 1000) IN (SELECT DISTINCT blockSize() FROM system.numbers SETTINGS max_block_size = 123, max_rows_to_read = 1000, read_overflow_mode = 'break') SETTINGS max_rows_to_read = 1000000, read_overflow_mode = 'break'; SELECT * FROM (SELECT DISTINCT blockSize() AS x FROM system.numbers SETTINGS max_block_size = 123, max_rows_to_read = 1000, read_overflow_mode = 'break'); -SELECT x FROM (SELECT DISTINCT blockSize() AS x FROM remote('127.0.0.{1,2}', system.numbers) WHERE number IN (SELECT number * 2 FROM system.numbers SETTINGS max_rows_to_read = 10000, read_overflow_mode = 'break') SETTINGS max_block_size = 123, max_rows_to_read = 1000, read_overflow_mode = 'break') ORDER BY x; +SELECT x FROM (SELECT DISTINCT blockSize() AS x FROM remote('127.0.0.{2,3}', system.numbers) WHERE number IN (SELECT number * 2 FROM system.numbers SETTINGS max_rows_to_read = 10000, read_overflow_mode = 'break') SETTINGS max_block_size = 123, max_rows_to_read = 1000, read_overflow_mode = 'break') ORDER BY x; diff --git a/dbms/tests/queries/0_stateless/00171_shard_array_of_tuple_remote.sql b/dbms/tests/queries/0_stateless/00171_shard_array_of_tuple_remote.sql index 5db737e8e8b..2bd4156a4cb 100644 --- a/dbms/tests/queries/0_stateless/00171_shard_array_of_tuple_remote.sql +++ b/dbms/tests/queries/0_stateless/00171_shard_array_of_tuple_remote.sql @@ -1 +1 @@ -SELECT arrayMap((x, y) -> (x, y), [1, 2, 3], [4, 5, 6]) FROM remote('127.0.0.{1,2}', system.one) ORDER BY rand(); +SELECT arrayMap((x, y) -> (x, y), [1, 2, 3], [4, 5, 6]) FROM remote('127.0.0.{2,3}', system.one) ORDER BY rand(); diff --git a/dbms/tests/queries/0_stateless/00183_skip_unavailable_shards.sql b/dbms/tests/queries/0_stateless/00183_skip_unavailable_shards.sql index 4824bdba5ad..36768985c0f 100644 --- a/dbms/tests/queries/0_stateless/00183_skip_unavailable_shards.sql +++ b/dbms/tests/queries/0_stateless/00183_skip_unavailable_shards.sql @@ -1 +1 @@ -SELECT count() FROM remote('{127,1}.0.0.{1,2}', system.one) SETTINGS skip_unavailable_shards = 1; \ No newline at end of file +SELECT count() FROM remote('{127,1}.0.0.{2,3}', system.one) SETTINGS skip_unavailable_shards = 1; diff --git a/dbms/tests/queries/0_stateless/00184_shard_distributed_group_by_no_merge.sql b/dbms/tests/queries/0_stateless/00184_shard_distributed_group_by_no_merge.sql index f44fdca0836..7b7a0914c0c 100644 --- a/dbms/tests/queries/0_stateless/00184_shard_distributed_group_by_no_merge.sql +++ b/dbms/tests/queries/0_stateless/00184_shard_distributed_group_by_no_merge.sql @@ -1 +1 @@ -SELECT count(), uniq(dummy) FROM remote('127.0.0.{1,2}', system.one) SETTINGS distributed_group_by_no_merge = 1; +SELECT count(), uniq(dummy) FROM remote('127.0.0.{2,3}', system.one) SETTINGS distributed_group_by_no_merge = 1; diff --git a/dbms/tests/queries/0_stateless/00195_shard_union_all_and_global_in.sql b/dbms/tests/queries/0_stateless/00195_shard_union_all_and_global_in.sql index f9bde9bbbb1..fa4a9b97c4d 100644 --- a/dbms/tests/queries/0_stateless/00195_shard_union_all_and_global_in.sql +++ b/dbms/tests/queries/0_stateless/00195_shard_union_all_and_global_in.sql @@ -1,4 +1,4 @@ SELECT * FROM (SELECT * WHERE dummy GLOBAL IN (SELECT 0)); SELECT * FROM (SELECT * WHERE dummy GLOBAL IN (SELECT toUInt8(number) FROM system.numbers LIMIT 10)); SELECT * FROM (SELECT * FROM (SELECT * FROM system.numbers LIMIT 20) WHERE number GLOBAL IN (SELECT number FROM system.numbers LIMIT 10)); -SELECT * FROM (SELECT * FROM remote('127.0.0.{1,2,3}', system.one) WHERE dummy GLOBAL IN (SELECT * FROM remote('127.0.0.{1,2}', system.one))); +SELECT * FROM (SELECT * FROM remote('127.0.0.{2,3,4}', system.one) WHERE dummy GLOBAL IN (SELECT * FROM remote('127.0.0.{2,3}', system.one))); diff --git a/dbms/tests/queries/0_stateless/00211_shard_query_formatting_aliases.sql b/dbms/tests/queries/0_stateless/00211_shard_query_formatting_aliases.sql index ffd6787d0df..390aac0571b 100644 --- a/dbms/tests/queries/0_stateless/00211_shard_query_formatting_aliases.sql +++ b/dbms/tests/queries/0_stateless/00211_shard_query_formatting_aliases.sql @@ -3,6 +3,6 @@ SELECT toUInt64(1) IN (1234567890, 2345678901, 3456789012, 4567890123, 567890123 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x -FROM remote('localhost', system, one) SETTINGS max_query_size = 10000; +FROM remote('127.0.0.2', system, one) SETTINGS max_query_size = 10000; -SELECT 1 AS x, x, (SELECT 2 AS x, x) FROM remote('127.0.0.{1,2}', system.one) WHERE (3, 4) IN (SELECT 3 AS x, toUInt8(x + 1)); +SELECT 1 AS x, x, (SELECT 2 AS x, x) FROM remote('127.0.0.{2,3}', system.one) WHERE (3, 4) IN (SELECT 3 AS x, toUInt8(x + 1)); diff --git a/dbms/tests/queries/0_stateless/00212_shard_aggregate_function_uniq.sql b/dbms/tests/queries/0_stateless/00212_shard_aggregate_function_uniq.sql index b91ae03bf0a..53b5ec0001b 100644 --- a/dbms/tests/queries/0_stateless/00212_shard_aggregate_function_uniq.sql +++ b/dbms/tests/queries/0_stateless/00212_shard_aggregate_function_uniq.sql @@ -16,7 +16,7 @@ SELECT Y, uniqHLL12(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) AS SELECT Y, uniqHLL12(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) AS Z, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 3000) GROUP BY Y; SELECT Y, uniqHLL12(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) AS Z, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 1000000) GROUP BY Y; -SELECT uniqHLL12(dummy) FROM remote('127.0.0.{1,2}', system.one); +SELECT uniqHLL12(dummy) FROM remote('127.0.0.{2,3}', system.one); /* uniqCombined */ @@ -36,4 +36,4 @@ SELECT Y, uniqCombined(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) SELECT Y, uniqCombined(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) AS Z, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 3000) GROUP BY Y; SELECT Y, uniqCombined(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) AS Z, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 1000000) GROUP BY Y; -SELECT uniqCombined(dummy) FROM remote('127.0.0.{1,2}', system.one); +SELECT uniqCombined(dummy) FROM remote('127.0.0.{2,3}', system.one); diff --git a/dbms/tests/queries/0_stateless/00217_global_subquery_columns_with_same_name.sql b/dbms/tests/queries/0_stateless/00217_global_subquery_columns_with_same_name.sql index 5f7ee7250b0..503edb359f1 100644 --- a/dbms/tests/queries/0_stateless/00217_global_subquery_columns_with_same_name.sql +++ b/dbms/tests/queries/0_stateless/00217_global_subquery_columns_with_same_name.sql @@ -1,2 +1,2 @@ -SELECT k, a FROM (SELECT 42 AS k FROM remote('localhost', system.one)) GLOBAL ALL FULL OUTER JOIN (SELECT 42 AS k, 1 AS a, a) USING k; -SELECT 1 FROM remote('localhost', system.one) WHERE (1, 1) GLOBAL IN (SELECT 1 AS a, a); +SELECT k, a FROM (SELECT 42 AS k FROM remote('127.0.0.2', system.one)) GLOBAL ALL FULL OUTER JOIN (SELECT 42 AS k, 1 AS a, a) USING k; +SELECT 1 FROM remote('127.0.0.2', system.one) WHERE (1, 1) GLOBAL IN (SELECT 1 AS a, a); diff --git a/dbms/tests/queries/0_stateless/00220_with_totals_in_subquery_remote_and_limit.sql b/dbms/tests/queries/0_stateless/00220_with_totals_in_subquery_remote_and_limit.sql index 758e96e294a..69fd37f1c2e 100644 --- a/dbms/tests/queries/0_stateless/00220_with_totals_in_subquery_remote_and_limit.sql +++ b/dbms/tests/queries/0_stateless/00220_with_totals_in_subquery_remote_and_limit.sql @@ -1 +1 @@ -SELECT x FROM (SELECT count() AS x FROM remote('localhost', system.one) WITH TOTALS) LIMIT 1; +SELECT x FROM (SELECT count() AS x FROM remote('127.0.0.2', system.one) WITH TOTALS) LIMIT 1; diff --git a/dbms/tests/queries/0_stateless/00223_shard_distributed_aggregation_memory_efficient.sql b/dbms/tests/queries/0_stateless/00223_shard_distributed_aggregation_memory_efficient.sql index 3462e48a58b..93aa6eaf693 100644 --- a/dbms/tests/queries/0_stateless/00223_shard_distributed_aggregation_memory_efficient.sql +++ b/dbms/tests/queries/0_stateless/00223_shard_distributed_aggregation_memory_efficient.sql @@ -6,126 +6,126 @@ CREATE TABLE test.numbers_10 ENGINE = Log AS SELECT * FROM system.numbers LIMIT SET distributed_aggregation_memory_efficient = 0; SET group_by_two_level_threshold = 1000; -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); SET distributed_aggregation_memory_efficient = 0; SET group_by_two_level_threshold = 7; -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); SET distributed_aggregation_memory_efficient = 1; SET group_by_two_level_threshold = 1000; -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); SET distributed_aggregation_memory_efficient = 1; SET group_by_two_level_threshold = 7; -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); SET distributed_aggregation_memory_efficient = 1; SET group_by_two_level_threshold = 1; -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10) FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY number); SET distributed_aggregation_memory_efficient = 1; SET group_by_two_level_threshold = 1000; -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); SET distributed_aggregation_memory_efficient = 1; SET group_by_two_level_threshold = 1; -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); -SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); +SELECT sum(c = 1) IN (0, 10), sum(c = 2) IN (0, 5), sum(c) = 10 FROM (SELECT number, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) AND number >= (randConstant() % 2 ? 0 : 5) GROUP BY number); SET distributed_aggregation_memory_efficient = 1; SET group_by_two_level_threshold = 7; -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 1) IN (0, 5), sum(c = 2) IN (5, 10), sum(c) IN (10, 15, 20) FROM (SELECT number AS k1, number + 1 AS k2, count() AS c FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 5 : 10) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); -SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); +SELECT sum(c = 20) IN (5, 10), sum(c = 10) IN (0, 5), sum(u != 10) = 0 FROM (SELECT intDiv(number, 10) AS k1, k1 + 1 AS k2, count() AS c, uniq(number) AS u FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 50 : 100) GROUP BY k1, k2 HAVING count() > 0 ORDER BY k1, k2); DROP TABLE test.numbers_10; -SELECT count() FROM remote('127.0.0.{1,2}', system.one); +SELECT count() FROM remote('127.0.0.{2,3}', system.one); diff --git a/dbms/tests/queries/0_stateless/00224_shard_distributed_aggregation_memory_efficient_and_overflows.sql b/dbms/tests/queries/0_stateless/00224_shard_distributed_aggregation_memory_efficient_and_overflows.sql index c18ed9bfbfa..26aceab2848 100644 --- a/dbms/tests/queries/0_stateless/00224_shard_distributed_aggregation_memory_efficient_and_overflows.sql +++ b/dbms/tests/queries/0_stateless/00224_shard_distributed_aggregation_memory_efficient_and_overflows.sql @@ -1,7 +1,7 @@ DROP TABLE IF EXISTS test.numbers_100k_log; CREATE TABLE test.numbers_100k_log ENGINE = Log AS SELECT * FROM system.numbers LIMIT 100000; -SELECT count() = 200000 FROM remote('127.0.0.{1,2}', test.numbers_100k_log) GROUP BY number WITH TOTALS ORDER BY number LIMIT 10; +SELECT count() = 200000 FROM remote('127.0.0.{2,3}', test.numbers_100k_log) GROUP BY number WITH TOTALS ORDER BY number LIMIT 10; SET distributed_aggregation_memory_efficient = 1, group_by_two_level_threshold = 1000, @@ -9,6 +9,6 @@ SET distributed_aggregation_memory_efficient = 1, max_rows_to_group_by = 1000, totals_mode = 'after_having_auto'; -SELECT count() = 200000 FROM remote('127.0.0.{1,2}', test.numbers_100k_log) GROUP BY number WITH TOTALS ORDER BY number LIMIT 10; +SELECT count() = 200000 FROM remote('127.0.0.{2,3}', test.numbers_100k_log) GROUP BY number WITH TOTALS ORDER BY number LIMIT 10; DROP TABLE test.numbers_100k_log; diff --git a/dbms/tests/queries/0_stateless/00228_shard_quantiles_deterministic_merge_overflow.sql b/dbms/tests/queries/0_stateless/00228_shard_quantiles_deterministic_merge_overflow.sql index e1ecd9b0167..d1cb28bc97d 100644 --- a/dbms/tests/queries/0_stateless/00228_shard_quantiles_deterministic_merge_overflow.sql +++ b/dbms/tests/queries/0_stateless/00228_shard_quantiles_deterministic_merge_overflow.sql @@ -1,3 +1,3 @@ select quantilesDeterministic(0.5, 0.9)(number, number) from (select number from system.numbers limit 101); -- test merge does not cause overflow -select ignore(quantilesDeterministic(0.5, 0.9)(number, number)) from (select number from remote('127.0.0.{1,2}', system, numbers) limit 1000000); +select ignore(quantilesDeterministic(0.5, 0.9)(number, number)) from (select number from remote('127.0.0.{2,3}', system, numbers) limit 1000000); diff --git a/dbms/tests/queries/0_stateless/00252_shard_global_in_aggregate_function.sql b/dbms/tests/queries/0_stateless/00252_shard_global_in_aggregate_function.sql index 6a8c925eafa..575c568ee2e 100644 --- a/dbms/tests/queries/0_stateless/00252_shard_global_in_aggregate_function.sql +++ b/dbms/tests/queries/0_stateless/00252_shard_global_in_aggregate_function.sql @@ -2,5 +2,5 @@ DROP TABLE IF EXISTS test.storage; CREATE TABLE test.storage(UserID UInt64) ENGINE=Memory; INSERT INTO test.storage(UserID) values (6460432721393873721)(6460432721393873721)(6460432721393873721)(6460432721393873721)(6460432721393873721)(6460432721393873721)(6460432721393873721)(402895971392036118)(402895971392036118)(402895971392036118); -SELECT sum(UserID GLOBAL IN (SELECT UserID FROM remote('127.0.0.{1,2}', test.storage))) FROM remote('127.0.0.{1,2}', test.storage); -SELECT sum(UserID GLOBAL IN (SELECT UserID FROM test.storage)) FROM remote('127.0.0.{1,2}', test.storage); +SELECT sum(UserID GLOBAL IN (SELECT UserID FROM remote('127.0.0.{2,3}', test.storage))) FROM remote('127.0.0.{2,3}', test.storage); +SELECT sum(UserID GLOBAL IN (SELECT UserID FROM test.storage)) FROM remote('127.0.0.{2,3}', test.storage); diff --git a/dbms/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.sql b/dbms/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.sql index 15f4536e18f..2293b1de490 100644 --- a/dbms/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.sql +++ b/dbms/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.sql @@ -1,15 +1,15 @@ select 40 as z from (select * from system.numbers limit 3) group by z; -select 41 as z from remote('127.0.0.{1,2}', system.one) group by z; -select count(), 42 AS z from remote('127.0.0.{1,2}', system.one) group by z; -select 43 AS z from remote('127.0.0.{1,2}', system.one) group by 42, 43, 44; +select 41 as z from remote('127.0.0.{2,3}', system.one) group by z; +select count(), 42 AS z from remote('127.0.0.{2,3}', system.one) group by z; +select 43 AS z from remote('127.0.0.{2,3}', system.one) group by 42, 43, 44; select 11 AS z from (SELECT 2 UNION ALL SELECT 3) group by 42, 43, 44; select 40 as z from (select * from system.numbers limit 3) group by z WITH TOTALS; -select 41 as z from remote('127.0.0.{1,2}', system.one) group by z WITH TOTALS; -select count(), 42 AS z from remote('127.0.0.{1,2}', system.one) group by z WITH TOTALS; -select 43 AS z from remote('127.0.0.{1,2}', system.one) group by 42, 43, 44 WITH TOTALS; +select 41 as z from remote('127.0.0.{2,3}', system.one) group by z WITH TOTALS; +select count(), 42 AS z from remote('127.0.0.{2,3}', system.one) group by z WITH TOTALS; +select 43 AS z from remote('127.0.0.{2,3}', system.one) group by 42, 43, 44 WITH TOTALS; select 11 AS z from (SELECT 1 UNION ALL SELECT 2) group by 42, 43, 44 WITH TOTALS; select 11 AS z from (SELECT 2 UNION ALL SELECT 3) group by 42, 43, 44 WITH TOTALS; SELECT count() WITH TOTALS; -SELECT count() FROM remote('127.0.0.{1,2}', system.one) WITH TOTALS; +SELECT count() FROM remote('127.0.0.{2,3}', system.one) WITH TOTALS; diff --git a/dbms/tests/queries/0_stateless/00266_shard_global_subquery_and_aliases.sql b/dbms/tests/queries/0_stateless/00266_shard_global_subquery_and_aliases.sql index 3b2e54598bd..f15e1e5090e 100644 --- a/dbms/tests/queries/0_stateless/00266_shard_global_subquery_and_aliases.sql +++ b/dbms/tests/queries/0_stateless/00266_shard_global_subquery_and_aliases.sql @@ -1 +1 @@ -SELECT 1 GLOBAL IN (SELECT 1) AS s, s FROM remote('127.0.0.{1,2}', system.one); +SELECT 1 GLOBAL IN (SELECT 1) AS s, s FROM remote('127.0.0.{2,3}', system.one); diff --git a/dbms/tests/queries/0_stateless/00274_shard_group_array.sql b/dbms/tests/queries/0_stateless/00274_shard_group_array.sql index 710fad9921b..5257836ae5c 100644 --- a/dbms/tests/queries/0_stateless/00274_shard_group_array.sql +++ b/dbms/tests/queries/0_stateless/00274_shard_group_array.sql @@ -1,5 +1,5 @@ SELECT length(groupArray(number)), count() FROM (SELECT number FROM system.numbers_mt LIMIT 1000000); -SELECT groupArray(dummy), count() FROM remote('127.0.0.{1,2}', system.one); +SELECT groupArray(dummy), count() FROM remote('127.0.0.{2,3}', system.one); SELECT length(groupArray(toString(number))), count() FROM (SELECT number FROM system.numbers LIMIT 100000); -SELECT groupArray(toString(dummy)), count() FROM remote('127.0.0.{1,2}', system.one); +SELECT groupArray(toString(dummy)), count() FROM remote('127.0.0.{2,3}', system.one); diff --git a/dbms/tests/queries/0_stateless/00275_shard_quantiles_weighted.sql b/dbms/tests/queries/0_stateless/00275_shard_quantiles_weighted.sql index c012296fd18..648931ea790 100644 --- a/dbms/tests/queries/0_stateless/00275_shard_quantiles_weighted.sql +++ b/dbms/tests/queries/0_stateless/00275_shard_quantiles_weighted.sql @@ -12,12 +12,12 @@ SET min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0; SET max_block_size = 10; INSERT INTO test.numbers_1001 SELECT number FROM system.numbers LIMIT 1001; -SELECT quantileExactWeighted(0.5)(number, 1) FROM remote('127.0.0.{1,2}', test.numbers_1001); -SELECT quantilesExactWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, 1) FROM remote('127.0.0.{1,2}', test.numbers_1001); -SELECT quantilesExactWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, number) FROM remote('127.0.0.{1,2}', test.numbers_1001); +SELECT quantileExactWeighted(0.5)(number, 1) FROM remote('127.0.0.{2,3}', test.numbers_1001); +SELECT quantilesExactWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, 1) FROM remote('127.0.0.{2,3}', test.numbers_1001); +SELECT quantilesExactWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, number) FROM remote('127.0.0.{2,3}', test.numbers_1001); -SELECT quantileTimingWeighted(0.5)(number, 1) FROM remote('127.0.0.{1,2}', test.numbers_1001); -SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, 1) FROM remote('127.0.0.{1,2}', test.numbers_1001); -SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, number) FROM remote('127.0.0.{1,2}', test.numbers_1001); +SELECT quantileTimingWeighted(0.5)(number, 1) FROM remote('127.0.0.{2,3}', test.numbers_1001); +SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, 1) FROM remote('127.0.0.{2,3}', test.numbers_1001); +SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, number) FROM remote('127.0.0.{2,3}', test.numbers_1001); DROP TABLE test.numbers_1001; diff --git a/dbms/tests/queries/0_stateless/00290_shard_aggregation_memory_efficient.sql b/dbms/tests/queries/0_stateless/00290_shard_aggregation_memory_efficient.sql index d5ac0ff1b06..15984ec0dfa 100644 --- a/dbms/tests/queries/0_stateless/00290_shard_aggregation_memory_efficient.sql +++ b/dbms/tests/queries/0_stateless/00290_shard_aggregation_memory_efficient.sql @@ -3,15 +3,15 @@ SET max_block_size = 1000; CREATE TABLE test.numbers_10 ENGINE = Log AS SELECT * FROM system.numbers LIMIT 10000; SET distributed_aggregation_memory_efficient = 1, group_by_two_level_threshold = 5000; -SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; -SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; -SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; -SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; -SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; -SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; -SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; -SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; -SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; -SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{1,2}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; +SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; +SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; +SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; +SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; +SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; +SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; +SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; +SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; +SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; +SELECT concat(toString(number), arrayStringConcat(arrayMap(x -> '.', range(number % 10)))) AS k FROM remote('127.0.0.{2,3}', test.numbers_10) WHERE number < (randConstant() % 2 ? 4999 : 10000) GROUP BY k ORDER BY k LIMIT 10; DROP TABLE test.numbers_10; diff --git a/dbms/tests/queries/0_stateless/00293_shard_max_subquery_depth.sql b/dbms/tests/queries/0_stateless/00293_shard_max_subquery_depth.sql index 7cc04a8650e..a8f51a61c12 100644 --- a/dbms/tests/queries/0_stateless/00293_shard_max_subquery_depth.sql +++ b/dbms/tests/queries/0_stateless/00293_shard_max_subquery_depth.sql @@ -1,4 +1,4 @@ SET max_subquery_depth = 3; -SELECT 1 FROM remote('127.0.0.{1,2}', system.one) WHERE 1 GLOBAL IN (SELECT 1 FROM remote('127.0.0.{1,2}', system.one) WHERE 1 GLOBAL IN (SELECT 1 FROM remote('127.0.0.{1,2}', system.one) WHERE 1 GLOBAL IN (SELECT 1 FROM remote('127.0.0.{1,2}', system.one)))); +SELECT 1 FROM remote('127.0.0.{1,2}', system.one) WHERE 1 GLOBAL IN (SELECT 1 FROM remote('127.0.0.{2,3}', system.one) WHERE 1 GLOBAL IN (SELECT 1 FROM remote('127.0.0.{2,3}', system.one) WHERE 1 GLOBAL IN (SELECT 1 FROM remote('127.0.0.{2,3}', system.one)))); SELECT 2 FROM system.one WHERE 1 IN (SELECT 1 FROM system.one WHERE 1 IN (SELECT 1 FROM system.one WHERE 1 IN (SELECT 1 FROM system.one))); diff --git a/dbms/tests/queries/0_stateless/00294_enums.sql b/dbms/tests/queries/0_stateless/00294_enums.sql index 13c8302fbd4..8ea38a38cf1 100644 --- a/dbms/tests/queries/0_stateless/00294_enums.sql +++ b/dbms/tests/queries/0_stateless/00294_enums.sql @@ -73,8 +73,8 @@ create table test.enums_copy engine = TinyLog as select * from test.enums; select * from test.enums_copy; drop table test.enums_copy; -create table test.enums_copy engine = TinyLog as select * from remote('localhost', test, enums); -select * from remote('localhost', test, enums_copy); +create table test.enums_copy engine = TinyLog as select * from remote('127.0.0.2', test, enums); +select * from remote('127.0.0.2', test, enums_copy); drop table test.enums_copy; drop table test.enums; diff --git a/dbms/tests/queries/0_stateless/00295_global_in_one_shard_rows_before_limit.sql b/dbms/tests/queries/0_stateless/00295_global_in_one_shard_rows_before_limit.sql index 6f329a173c9..3fb96dae7c0 100644 --- a/dbms/tests/queries/0_stateless/00295_global_in_one_shard_rows_before_limit.sql +++ b/dbms/tests/queries/0_stateless/00295_global_in_one_shard_rows_before_limit.sql @@ -1,3 +1,3 @@ SET output_format_write_statistics = 0; -SELECT arrayJoin(range(100)) AS x FROM remote('localhost', system.one) WHERE x GLOBAL IN (SELECT toUInt8(arrayJoin(range(100)) + 50)) GROUP BY x ORDER BY x LIMIT 10 FORMAT JSONCompact; -SELECT arrayJoin(range(100)) AS x FROM remote('127.0.0.{1,2}', system.one) WHERE x GLOBAL IN (SELECT toUInt8(arrayJoin(range(100)) + 50)) GROUP BY x ORDER BY x LIMIT 10 FORMAT JSONCompact; +SELECT arrayJoin(range(100)) AS x FROM remote('127.0.0.2', system.one) WHERE x GLOBAL IN (SELECT toUInt8(arrayJoin(range(100)) + 50)) GROUP BY x ORDER BY x LIMIT 10 FORMAT JSONCompact; +SELECT arrayJoin(range(100)) AS x FROM remote('127.0.0.{2,3}', system.one) WHERE x GLOBAL IN (SELECT toUInt8(arrayJoin(range(100)) + 50)) GROUP BY x ORDER BY x LIMIT 10 FORMAT JSONCompact; diff --git a/dbms/tests/queries/0_stateless/00336_shard_stack_trace.sh b/dbms/tests/queries/0_stateless/00336_shard_stack_trace.sh index 7c8186184ed..941cd5bbe15 100755 --- a/dbms/tests/queries/0_stateless/00336_shard_stack_trace.sh +++ b/dbms/tests/queries/0_stateless/00336_shard_stack_trace.sh @@ -6,8 +6,8 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d 'SELECT a' | wc -l ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}?stacktrace=0" -d 'SELECT a' | wc -l [[ $(${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}?stacktrace=1" -d 'SELECT a' | wc -l) -gt 3 ]] && echo 'Ok' || echo 'Fail' -${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT intDiv(number, 0) FROM remote('127.0.0.{1,2}', system.numbers)" | wc -l +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT intDiv(number, 0) FROM remote('127.0.0.{2,3}', system.numbers)" | wc -l $CLICKHOUSE_CLIENT --query="SELECT a" 2>&1 | wc -l [[ $($CLICKHOUSE_CLIENT --query="SELECT a" --stacktrace 2>&1 | wc -l) -gt 3 ]] && echo 'Ok' || echo 'Fail' -$CLICKHOUSE_CLIENT --query="SELECT intDiv(number, 0) FROM remote('127.0.0.{1,2}', system.numbers)" 2>&1 | wc -l +$CLICKHOUSE_CLIENT --query="SELECT intDiv(number, 0) FROM remote('127.0.0.{2,3}', system.numbers)" 2>&1 | wc -l diff --git a/dbms/tests/queries/0_stateless/00337_shard_any_heavy.sql b/dbms/tests/queries/0_stateless/00337_shard_any_heavy.sql index 51f468039f0..508db866f86 100644 --- a/dbms/tests/queries/0_stateless/00337_shard_any_heavy.sql +++ b/dbms/tests/queries/0_stateless/00337_shard_any_heavy.sql @@ -1,2 +1,2 @@ SELECT anyHeavy(x) FROM (SELECT intHash64(number) % 100 < 60 ? 999 : number AS x FROM system.numbers LIMIT 100000); -SELECT anyHeavy(1) FROM remote('127.0.0.{1,2}', system.one); +SELECT anyHeavy(1) FROM remote('127.0.0.{2,3}', system.one); diff --git a/dbms/tests/queries/0_stateless/00375_shard_group_uniq_array_of_string.sql b/dbms/tests/queries/0_stateless/00375_shard_group_uniq_array_of_string.sql index b0547691c19..210c5f4a0fd 100644 --- a/dbms/tests/queries/0_stateless/00375_shard_group_uniq_array_of_string.sql +++ b/dbms/tests/queries/0_stateless/00375_shard_group_uniq_array_of_string.sql @@ -5,6 +5,6 @@ INSERT INTO test.group_uniq_str SELECT 2 as id, toString(number % 100) as v FROM INSERT INTO test.group_uniq_str SELECT 5 as id, toString(number % 100) as v FROM system.numbers LIMIT 10000000; SELECT length(groupUniqArray(v)) FROM test.group_uniq_str GROUP BY id ORDER BY id; -SELECT length(groupUniqArray(v)) FROM remote('127.0.0.{1,2,3,4}', 'test', 'group_uniq_str') GROUP BY id ORDER BY id; +SELECT length(groupUniqArray(v)) FROM remote('127.0.0.{2,3,4,5}', 'test', 'group_uniq_str') GROUP BY id ORDER BY id; DROP TABLE IF EXISTS test.group_uniq_str; diff --git a/dbms/tests/queries/0_stateless/00376_shard_group_uniq_array_of_int_array.sql b/dbms/tests/queries/0_stateless/00376_shard_group_uniq_array_of_int_array.sql index c0a55d09e2e..fd8d4acbf02 100644 --- a/dbms/tests/queries/0_stateless/00376_shard_group_uniq_array_of_int_array.sql +++ b/dbms/tests/queries/0_stateless/00376_shard_group_uniq_array_of_int_array.sql @@ -4,6 +4,6 @@ CREATE TABLE test.group_uniq_arr_int ENGINE = Memory AS (SELECT intDiv(number%1000000, 100) as v, intDiv(number%100, 10) as g, number%10 as c FROM system.numbers WHERE c < 3 LIMIT 10000000); SELECT length(groupUniqArray(v)) FROM test.group_uniq_arr_int GROUP BY id ORDER BY id; -SELECT length(groupUniqArray(v)) FROM remote('127.0.0.{1,2,3,4}', 'test', 'group_uniq_arr_int') GROUP BY id ORDER BY id; +SELECT length(groupUniqArray(v)) FROM remote('127.0.0.{2,3,4,5}', 'test', 'group_uniq_arr_int') GROUP BY id ORDER BY id; DROP TABLE IF EXISTS test.group_uniq_arr_int; diff --git a/dbms/tests/queries/0_stateless/00377_shard_group_uniq_array_of_string_array.sql b/dbms/tests/queries/0_stateless/00377_shard_group_uniq_array_of_string_array.sql index 7ffe6d3a754..1ba41b60b52 100644 --- a/dbms/tests/queries/0_stateless/00377_shard_group_uniq_array_of_string_array.sql +++ b/dbms/tests/queries/0_stateless/00377_shard_group_uniq_array_of_string_array.sql @@ -4,6 +4,6 @@ CREATE TABLE test.group_uniq_arr_str ENGINE = Memory AS (SELECT intDiv(number%1000000, 100) as v, intDiv(number%100, 10) as g, number%10 as c FROM system.numbers WHERE c < 3 LIMIT 10000000); SELECT length(groupUniqArray(v)) FROM test.group_uniq_arr_str GROUP BY id ORDER BY id; -SELECT length(groupUniqArray(v)) FROM remote('127.0.0.{1,2,3,4}', 'test', 'group_uniq_arr_str') GROUP BY id ORDER BY id; +SELECT length(groupUniqArray(v)) FROM remote('127.0.0.{2,3,4,5}', 'test', 'group_uniq_arr_str') GROUP BY id ORDER BY id; DROP TABLE IF EXISTS test.group_uniq_arr_str; diff --git a/dbms/tests/queries/0_stateless/00409_shard_limit_by.sql b/dbms/tests/queries/0_stateless/00409_shard_limit_by.sql index dab31b99235..982cff9a6c5 100644 --- a/dbms/tests/queries/0_stateless/00409_shard_limit_by.sql +++ b/dbms/tests/queries/0_stateless/00409_shard_limit_by.sql @@ -24,9 +24,9 @@ SELECT Num, count(*) FROM test.limit_by GROUP BY Num ORDER BY Num LIMIT 2 BY Num SELECT Num, Name FROM test.limit_by ORDER BY Num LIMIT 1 BY Num, Name LIMIT 3; -- Distributed LIMIT BY -SELECT dummy FROM remote('127.0.0.{1,2}', system.one) LIMIT 1 BY dummy; -SELECT dummy FROM remote('127.0.0.{1,2}', system.one) LIMIT 2 BY dummy; +SELECT dummy FROM remote('127.0.0.{2,3}', system.one) LIMIT 1 BY dummy; +SELECT dummy FROM remote('127.0.0.{2,3}', system.one) LIMIT 2 BY dummy; -SELECT 1 as one FROM remote('127.0.0.{1,2}', system.one) LIMIT 1 BY one; +SELECT 1 as one FROM remote('127.0.0.{2,3}', system.one) LIMIT 1 BY one; DROP TABLE IF EXISTS test.limit_by; diff --git a/dbms/tests/queries/0_stateless/00424_shard_aggregate_functions_of_nullable.sql b/dbms/tests/queries/0_stateless/00424_shard_aggregate_functions_of_nullable.sql index cc267b512e6..e1b3cd70842 100644 --- a/dbms/tests/queries/0_stateless/00424_shard_aggregate_functions_of_nullable.sql +++ b/dbms/tests/queries/0_stateless/00424_shard_aggregate_functions_of_nullable.sql @@ -35,6 +35,6 @@ SELECT quantileExactWeighted(0.5)(x, y) FROM SELECT sum(1 + CAST(dummy AS Nullable(UInt8))) AS res1, toTypeName(res1) AS t1, sum(1 + nullIf(dummy, 0)) AS res2, toTypeName(res2) AS t2 -FROM remote('127.0.0.{1,2}', system.one); +FROM remote('127.0.0.{2,3}', system.one); SELECT CAST(NULL AS Nullable(UInt64)) FROM system.numbers LIMIT 2 diff --git a/dbms/tests/queries/0_stateless/00459_group_array_insert_at.sql b/dbms/tests/queries/0_stateless/00459_group_array_insert_at.sql index b692038e9c5..703cc79d8d1 100644 --- a/dbms/tests/queries/0_stateless/00459_group_array_insert_at.sql +++ b/dbms/tests/queries/0_stateless/00459_group_array_insert_at.sql @@ -2,5 +2,5 @@ SELECT groupArrayInsertAt(toString(number), number * 2) FROM (SELECT * FROM syst SELECT groupArrayInsertAt('-')(toString(number), number * 2) FROM (SELECT * FROM system.numbers LIMIT 10); SELECT groupArrayInsertAt([123])(range(number), number * 2) FROM (SELECT * FROM system.numbers LIMIT 10); SELECT number, groupArrayInsertAt(number, number) FROM (SELECT * FROM system.numbers LIMIT 10) GROUP BY number ORDER BY number; -SELECT k, ignore(groupArrayInsertAt(x, x)) FROM (SELECT dummy AS k, randConstant() % 10 AS x FROM remote('127.0.0.{1,1}', system.one)) GROUP BY k ORDER BY k; -SELECT k, groupArrayInsertAt('-', 10)(toString(x), x) FROM (SELECT number AS k, number AS x FROM system.numbers LIMIT 11) GROUP BY k ORDER BY k; \ No newline at end of file +SELECT k, ignore(groupArrayInsertAt(x, x)) FROM (SELECT dummy AS k, randConstant() % 10 AS x FROM remote('127.0.0.{2,2}', system.one)) GROUP BY k ORDER BY k; +SELECT k, groupArrayInsertAt('-', 10)(toString(x), x) FROM (SELECT number AS k, number AS x FROM system.numbers LIMIT 11) GROUP BY k ORDER BY k; diff --git a/dbms/tests/queries/0_stateless/00491_shard_distributed_and_aliases_in_where_having.sql b/dbms/tests/queries/0_stateless/00491_shard_distributed_and_aliases_in_where_having.sql index fe6d8055d80..0b1c19996bf 100644 --- a/dbms/tests/queries/0_stateless/00491_shard_distributed_and_aliases_in_where_having.sql +++ b/dbms/tests/queries/0_stateless/00491_shard_distributed_and_aliases_in_where_having.sql @@ -1 +1 @@ -SELECT dummy FROM (SELECT dummy, NOT dummy AS x FROM remote('127.0.0.{1,2}', system.one) GROUP BY dummy HAVING x); +SELECT dummy FROM (SELECT dummy, NOT dummy AS x FROM remote('127.0.0.{2,3}', system.one) GROUP BY dummy HAVING x); diff --git a/dbms/tests/queries/0_stateless/00494_alias_substitution_bug.sql b/dbms/tests/queries/0_stateless/00494_alias_substitution_bug.sql index b3f7cadb61e..e0293bef4ae 100644 --- a/dbms/tests/queries/0_stateless/00494_alias_substitution_bug.sql +++ b/dbms/tests/queries/0_stateless/00494_alias_substitution_bug.sql @@ -1,7 +1,7 @@ DROP TABLE IF EXISTS test.nested; CREATE TABLE test.nested (n Nested(x UInt8)) ENGINE = Memory; INSERT INTO test.nested VALUES ([1, 2]); -SELECT 1 AS x FROM remote('localhost', test.nested) ARRAY JOIN n.x; +SELECT 1 AS x FROM remote('127.0.0.2', test.nested) ARRAY JOIN n.x; DROP TABLE test.nested; SELECT dummy AS dummy, dummy AS b FROM system.one; diff --git a/dbms/tests/queries/0_stateless/00506_global_in_union.sql b/dbms/tests/queries/0_stateless/00506_global_in_union.sql index 85a9a1cc60b..241cde60356 100644 --- a/dbms/tests/queries/0_stateless/00506_global_in_union.sql +++ b/dbms/tests/queries/0_stateless/00506_global_in_union.sql @@ -7,11 +7,11 @@ CREATE TABLE test.globalin (CounterID UInt32, StartDate Date ) ENGINE = Memory; INSERT INTO test.globalin VALUES (34, toDate('2017-10-02')), (42, toDate('2017-10-02')), (55, toDate('2017-10-01')); -SELECT * FROM ( SELECT CounterID FROM remote('localhost', 'test', 'globalin') WHERE (CounterID GLOBAL IN ( SELECT toUInt32(34))) GROUP BY CounterID); +SELECT * FROM ( SELECT CounterID FROM remote('127.0.0.2', 'test', 'globalin') WHERE (CounterID GLOBAL IN ( SELECT toUInt32(34))) GROUP BY CounterID); SELECT 'NOW okay =========================:'; -SELECT CounterID FROM remote('localhost', 'test', 'globalin') WHERE (CounterID GLOBAL IN ( SELECT toUInt32(34) )) GROUP BY CounterID UNION ALL SELECT CounterID FROM remote('localhost', 'test', 'globalin') WHERE (CounterID GLOBAL IN ( SELECT toUInt32(34))) GROUP BY CounterID; +SELECT CounterID FROM remote('127.0.0.2', 'test', 'globalin') WHERE (CounterID GLOBAL IN ( SELECT toUInt32(34) )) GROUP BY CounterID UNION ALL SELECT CounterID FROM remote('127.0.0.2', 'test', 'globalin') WHERE (CounterID GLOBAL IN ( SELECT toUInt32(34))) GROUP BY CounterID; SELECT 'NOW BAD ==========================:'; -SELECT * FROM ( SELECT CounterID FROM remote('localhost', 'test', 'globalin') WHERE (CounterID GLOBAL IN ( SELECT toUInt32(34) )) GROUP BY CounterID UNION ALL SELECT CounterID FROM remote('localhost', 'test', 'globalin') WHERE (CounterID GLOBAL IN ( SELECT toUInt32(34))) GROUP BY CounterID); +SELECT * FROM ( SELECT CounterID FROM remote('127.0.0.2', 'test', 'globalin') WHERE (CounterID GLOBAL IN ( SELECT toUInt32(34) )) GROUP BY CounterID UNION ALL SELECT CounterID FROM remote('127.0.0.2', 'test', 'globalin') WHERE (CounterID GLOBAL IN ( SELECT toUInt32(34))) GROUP BY CounterID); SELECT 'finish ===========================;'; DROP TABLE test.globalin; diff --git a/dbms/tests/queries/0_stateless/00515_desc_table_functions_and_subqueries.sql b/dbms/tests/queries/0_stateless/00515_desc_table_functions_and_subqueries.sql index 4a5e59bc161..a5be310a4d5 100644 --- a/dbms/tests/queries/0_stateless/00515_desc_table_functions_and_subqueries.sql +++ b/dbms/tests/queries/0_stateless/00515_desc_table_functions_and_subqueries.sql @@ -4,9 +4,9 @@ desc test.tab; select '-'; desc table test.tab; select '-'; -desc remote('localhost', test.tab); +desc remote('127.0.0.2', test.tab); select '-'; -desc table remote('localhost', test.tab); +desc table remote('127.0.0.2', test.tab); select '-'; desc (select 1); select '-'; diff --git a/dbms/tests/queries/0_stateless/00546_shard_tuple_element_formatting.sql b/dbms/tests/queries/0_stateless/00546_shard_tuple_element_formatting.sql index 8b793390306..5157eb7e813 100644 --- a/dbms/tests/queries/0_stateless/00546_shard_tuple_element_formatting.sql +++ b/dbms/tests/queries/0_stateless/00546_shard_tuple_element_formatting.sql @@ -1 +1 @@ -SELECT tupleElement((1, 2), toUInt8(1 + 0)) FROM remote('127.0.0.{1,2}', system.one); +SELECT tupleElement((1, 2), toUInt8(1 + 0)) FROM remote('127.0.0.{2,3}', system.one); diff --git a/dbms/tests/queries/0_stateless/00557_remote_port.sh b/dbms/tests/queries/0_stateless/00557_remote_port.sh index 9cb3c29e3ad..05ffaa749a7 100755 --- a/dbms/tests/queries/0_stateless/00557_remote_port.sh +++ b/dbms/tests/queries/0_stateless/00557_remote_port.sh @@ -4,10 +4,10 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . $CURDIR/../shell_config.sh if [ $CLICKHOUSE_HOST == "localhost" ]; then - $CLICKHOUSE_CLIENT -q "SELECT * FROM remote('127.0.0.1', system, one);" - $CLICKHOUSE_CLIENT -q "SELECT * FROM remote('127.0.0.{1,1}', system, one);" - $CLICKHOUSE_CLIENT -q "SELECT * FROM remote('127.0.0.1:${CLICKHOUSE_PORT_TCP}', system, one);" - $CLICKHOUSE_CLIENT -q "SELECT * FROM remote('127.0.0.{1,1}:${CLICKHOUSE_PORT_TCP}', system, one);" + $CLICKHOUSE_CLIENT -q "SELECT * FROM remote('127.0.0.2', system, one);" + $CLICKHOUSE_CLIENT -q "SELECT * FROM remote('127.0.0.{2,2}', system, one);" + $CLICKHOUSE_CLIENT -q "SELECT * FROM remote('127.0.0.2:${CLICKHOUSE_PORT_TCP}', system, one);" + $CLICKHOUSE_CLIENT -q "SELECT * FROM remote('127.0.0.{2,2}:${CLICKHOUSE_PORT_TCP}', system, one);" else # Can't test without localhost echo 0 diff --git a/dbms/tests/queries/0_stateless/00563_insert_into_remote.reference b/dbms/tests/queries/0_stateless/00563_insert_into_remote.reference index 8f19cda69a9..f799204847c 100644 --- a/dbms/tests/queries/0_stateless/00563_insert_into_remote.reference +++ b/dbms/tests/queries/0_stateless/00563_insert_into_remote.reference @@ -4,4 +4,3 @@ 3 3 3 - diff --git a/dbms/tests/queries/0_stateless/00563_insert_into_remote.sql b/dbms/tests/queries/0_stateless/00563_insert_into_remote.sql index 577be6f9d2f..c1d0ce6ea57 100644 --- a/dbms/tests/queries/0_stateless/00563_insert_into_remote.sql +++ b/dbms/tests/queries/0_stateless/00563_insert_into_remote.sql @@ -1,8 +1,8 @@ create database if not exists test; drop table if exists test.tab; create table test.tab (val UInt8) engine = Log; -insert into function remote('127.0.0.1', test.tab) values (1); -insert into function remote('127.0.0.{1|2}', test.tab) values (2); -insert into function remote('127.0.0.{1|2|3}', test.tab) values (3); +insert into function remote('127.0.0.2', test.tab) values (1); +insert into function remote('127.0.0.{2|3}', test.tab) values (2); +insert into function remote('127.0.0.{2|3|4}', test.tab) values (3); select * from test.tab order by val;