From af3ccde339c01ac0c86acd4749329ddac63de3dc Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 6 Jun 2015 04:14:56 +0300 Subject: [PATCH] dbms: section SETTINGS: added tests [#METR-16354]. --- .../queries/0_stateless/00167_settings_inside_query.reference | 4 ++++ .../tests/queries/0_stateless/00167_settings_inside_query.sql | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00167_settings_inside_query.reference create mode 100644 dbms/tests/queries/0_stateless/00167_settings_inside_query.sql diff --git a/dbms/tests/queries/0_stateless/00167_settings_inside_query.reference b/dbms/tests/queries/0_stateless/00167_settings_inside_query.reference new file mode 100644 index 00000000000..cd62bbbf596 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00167_settings_inside_query.reference @@ -0,0 +1,4 @@ +123 +123 +61 +62 diff --git a/dbms/tests/queries/0_stateless/00167_settings_inside_query.sql b/dbms/tests/queries/0_stateless/00167_settings_inside_query.sql new file mode 100644 index 00000000000..c24375ded00 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00167_settings_inside_query.sql @@ -0,0 +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;