From 3e1dafe3cb96b69fc34df13cd10bdc79adfe2818 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 28 Feb 2015 00:07:42 +0300 Subject: [PATCH] dbms: added test (now broken) [#METR-15167]. --- .../0_stateless/00130_buffer_and_prewhere.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00130_buffer_and_prewhere.sql diff --git a/dbms/tests/queries/0_stateless/00130_buffer_and_prewhere.sql b/dbms/tests/queries/0_stateless/00130_buffer_and_prewhere.sql new file mode 100644 index 00000000000..ce8ba033ea2 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00130_buffer_and_prewhere.sql @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS test.mt; +DROP TABLE IF EXISTS test.buf; + +CREATE TABLE test.mt (a UInt8, d Date) ENGINE = MergeTree(d, a, 1); +CREATE TABLE test.buf AS test.mt ENGINE = Buffer(test, mt, 1, 100, 100, 1000000, 1000000, 1000000000, 1000000000); + +INSERT INTO test.buf SELECT toUInt8(number) AS a, toDate('2015-01-01') AS d FROM system.numbers LIMIT 1000; +SELECT count() FROM test.mt; +SELECT count() FROM test.buf; +SELECT * FROM test.buf PREWHERE a < 10; + +OPTIMIZE TABLE test.buf; +SELECT count() FROM test.mt; +SELECT count() FROM test.buf; +SELECT * FROM test.buf PREWHERE a < 10; + +DROP TABLE test.buf; +DROP TABLE test.mt;