mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix some tests to support pytest with query tests (#9062)
This commit is contained in:
parent
5b4b04e13b
commit
1f4ba36cbc
@ -1,24 +1,31 @@
|
||||
DROP TABLE IF EXISTS default.test_table;
|
||||
DROP TABLE IF EXISTS default.test_view;
|
||||
DROP TABLE IF EXISTS default.test_view_filtered;
|
||||
CREATE DATABASE IF NOT EXISTS test_00101_0;
|
||||
|
||||
CREATE TABLE default.test_table (EventDate Date, CounterID UInt32, UserID UInt64, EventTime DateTime, UTCEventTime DateTime) ENGINE = MergeTree(EventDate, CounterID, 8192);
|
||||
CREATE MATERIALIZED VIEW default.test_view (Rows UInt64, MaxHitTime DateTime) ENGINE = Memory AS SELECT count() AS Rows, max(UTCEventTime) AS MaxHitTime FROM default.test_table;
|
||||
CREATE MATERIALIZED VIEW default.test_view_filtered (EventDate Date, CounterID UInt32) ENGINE = Memory POPULATE AS SELECT CounterID, EventDate FROM default.test_table WHERE EventDate < '2013-01-01';
|
||||
USE test_00101_0;
|
||||
|
||||
INSERT INTO default.test_table (EventDate, UTCEventTime) VALUES ('2014-01-02', '2014-01-02 03:04:06');
|
||||
DROP TABLE IF EXISTS test_table;
|
||||
DROP TABLE IF EXISTS test_view;
|
||||
DROP TABLE IF EXISTS test_view_filtered;
|
||||
|
||||
SELECT * FROM default.test_table;
|
||||
SELECT * FROM default.test_view;
|
||||
SELECT * FROM default.test_view_filtered;
|
||||
CREATE TABLE test_table (EventDate Date, CounterID UInt32, UserID UInt64, EventTime DateTime, UTCEventTime DateTime) ENGINE = MergeTree(EventDate, CounterID, 8192);
|
||||
CREATE MATERIALIZED VIEW test_view (Rows UInt64, MaxHitTime DateTime) ENGINE = Memory AS SELECT count() AS Rows, max(UTCEventTime) AS MaxHitTime FROM test_table;
|
||||
CREATE MATERIALIZED VIEW test_view_filtered (EventDate Date, CounterID UInt32) ENGINE = Memory POPULATE AS SELECT CounterID, EventDate FROM test_table WHERE EventDate < '2013-01-01';
|
||||
|
||||
DROP TABLE default.test_table;
|
||||
DROP TABLE default.test_view;
|
||||
DROP TABLE default.test_view_filtered;
|
||||
INSERT INTO test_table (EventDate, UTCEventTime) VALUES ('2014-01-02', '2014-01-02 03:04:06');
|
||||
|
||||
SELECT * FROM test_table;
|
||||
SELECT * FROM test_view;
|
||||
SELECT * FROM test_view_filtered;
|
||||
|
||||
DROP TABLE test_table;
|
||||
DROP TABLE test_view;
|
||||
DROP TABLE test_view_filtered;
|
||||
|
||||
-- Check only sophisticated constructors and desctructors:
|
||||
|
||||
USE test;
|
||||
CREATE DATABASE IF NOT EXISTS test_00101_1;
|
||||
|
||||
USE test_00101_1;
|
||||
|
||||
DROP TABLE IF EXISTS tmp;
|
||||
DROP TABLE IF EXISTS tmp_mv;
|
||||
DROP TABLE IF EXISTS tmp_mv2;
|
||||
@ -44,3 +51,8 @@ EXISTS TABLE `.inner.tmp_mv`;
|
||||
EXISTS TABLE `.inner.tmp_mv2`;
|
||||
EXISTS TABLE `.inner.tmp_mv3`;
|
||||
EXISTS TABLE `.inner.tmp_mv4`;
|
||||
|
||||
DROP TABLE tmp;
|
||||
|
||||
DROP DATABASE test_00101_0;
|
||||
DROP DATABASE test_00101_1;
|
||||
|
@ -1,73 +1,73 @@
|
||||
SELECT '===Ordinary case===';
|
||||
|
||||
DROP TABLE IF EXISTS test.clear_column;
|
||||
CREATE TABLE test.clear_column (d Date, num Int64, str String) ENGINE = MergeTree(d, d, 8192);
|
||||
DROP TABLE IF EXISTS clear_column;
|
||||
CREATE TABLE clear_column (d Date, num Int64, str String) ENGINE = MergeTree(d, d, 8192);
|
||||
|
||||
INSERT INTO test.clear_column VALUES ('2016-12-12', 1, 'a'), ('2016-11-12', 2, 'b');
|
||||
INSERT INTO clear_column VALUES ('2016-12-12', 1, 'a'), ('2016-11-12', 2, 'b');
|
||||
|
||||
SELECT data_uncompressed_bytes FROM system.columns WHERE (database = 'test') AND (table = 'clear_column') AND (name = 'num');
|
||||
SELECT data_uncompressed_bytes FROM system.columns WHERE (database = currentDatabase()) AND (table = 'clear_column') AND (name = 'num');
|
||||
|
||||
SELECT num, str FROM test.clear_column ORDER BY num;
|
||||
ALTER TABLE test.clear_column CLEAR COLUMN num IN PARTITION '201612';
|
||||
SELECT num, str FROM test.clear_column ORDER BY num;
|
||||
SELECT num, str FROM clear_column ORDER BY num;
|
||||
ALTER TABLE clear_column CLEAR COLUMN num IN PARTITION '201612';
|
||||
SELECT num, str FROM clear_column ORDER BY num;
|
||||
|
||||
SELECT data_uncompressed_bytes FROM system.columns WHERE (database = 'test') AND (table = 'clear_column') AND (name = 'num');
|
||||
ALTER TABLE test.clear_column CLEAR COLUMN num IN PARTITION '201611';
|
||||
SELECT data_compressed_bytes, data_uncompressed_bytes FROM system.columns WHERE (database = 'test') AND (table = 'clear_column') AND (name = 'num');
|
||||
SELECT data_uncompressed_bytes FROM system.columns WHERE (database = currentDatabase()) AND (table = 'clear_column') AND (name = 'num');
|
||||
ALTER TABLE clear_column CLEAR COLUMN num IN PARTITION '201611';
|
||||
SELECT data_compressed_bytes, data_uncompressed_bytes FROM system.columns WHERE (database = currentDatabase()) AND (table = 'clear_column') AND (name = 'num');
|
||||
|
||||
DROP TABLE test.clear_column;
|
||||
DROP TABLE clear_column;
|
||||
|
||||
SELECT '===Replicated case===';
|
||||
|
||||
SYSTEM STOP MERGES;
|
||||
DROP TABLE IF EXISTS test.clear_column1;
|
||||
DROP TABLE IF EXISTS test.clear_column2;
|
||||
CREATE TABLE test.clear_column1 (d Date, i Int64) ENGINE = ReplicatedMergeTree('/clickhouse/test/tables/clear_column', '1', d, d, 8192);
|
||||
CREATE TABLE test.clear_column2 (d Date, i Int64) ENGINE = ReplicatedMergeTree('/clickhouse/test/tables/clear_column', '2', d, d, 8192);
|
||||
DROP TABLE IF EXISTS clear_column1;
|
||||
DROP TABLE IF EXISTS clear_column2;
|
||||
CREATE TABLE clear_column1 (d Date, i Int64) ENGINE = ReplicatedMergeTree('/clickhouse/test/tables/clear_column', '1', d, d, 8192);
|
||||
CREATE TABLE clear_column2 (d Date, i Int64) ENGINE = ReplicatedMergeTree('/clickhouse/test/tables/clear_column', '2', d, d, 8192);
|
||||
|
||||
INSERT INTO test.clear_column1 (d) VALUES ('2000-01-01'), ('2000-02-01');
|
||||
SYSTEM SYNC REPLICA test.clear_column2;
|
||||
INSERT INTO clear_column1 (d) VALUES ('2000-01-01'), ('2000-02-01');
|
||||
SYSTEM SYNC REPLICA clear_column2;
|
||||
|
||||
SET replication_alter_partitions_sync=2;
|
||||
ALTER TABLE test.clear_column1 ADD COLUMN s String;
|
||||
ALTER TABLE test.clear_column1 CLEAR COLUMN s IN PARTITION '200001';
|
||||
ALTER TABLE clear_column1 ADD COLUMN s String;
|
||||
ALTER TABLE clear_column1 CLEAR COLUMN s IN PARTITION '200001';
|
||||
|
||||
INSERT INTO test.clear_column1 VALUES ('2000-01-01', 1, 'a'), ('2000-02-01', 2, 'b');
|
||||
INSERT INTO test.clear_column1 VALUES ('2000-01-01', 3, 'c'), ('2000-02-01', 4, 'd');
|
||||
SYSTEM SYNC REPLICA test.clear_column2;
|
||||
INSERT INTO clear_column1 VALUES ('2000-01-01', 1, 'a'), ('2000-02-01', 2, 'b');
|
||||
INSERT INTO clear_column1 VALUES ('2000-01-01', 3, 'c'), ('2000-02-01', 4, 'd');
|
||||
SYSTEM SYNC REPLICA clear_column2;
|
||||
|
||||
SELECT 'all';
|
||||
SELECT * FROM test.clear_column2 ORDER BY d, i, s;
|
||||
SELECT * FROM clear_column2 ORDER BY d, i, s;
|
||||
|
||||
SELECT 'w/o i 1';
|
||||
ALTER TABLE test.clear_column1 CLEAR COLUMN i IN PARTITION '200001';
|
||||
SELECT * FROM test.clear_column2 ORDER BY d, i, s;
|
||||
ALTER TABLE clear_column1 CLEAR COLUMN i IN PARTITION '200001';
|
||||
SELECT * FROM clear_column2 ORDER BY d, i, s;
|
||||
|
||||
SELECT 'w/o is 1';
|
||||
ALTER TABLE test.clear_column1 CLEAR COLUMN s IN PARTITION '200001';
|
||||
SELECT * FROM test.clear_column2 ORDER BY d, i, s;
|
||||
ALTER TABLE clear_column1 CLEAR COLUMN s IN PARTITION '200001';
|
||||
SELECT * FROM clear_column2 ORDER BY d, i, s;
|
||||
|
||||
SELECT 'w/o is 12';
|
||||
ALTER TABLE test.clear_column1 CLEAR COLUMN i IN PARTITION '200002';
|
||||
ALTER TABLE test.clear_column1 CLEAR COLUMN s IN PARTITION '200002';
|
||||
SELECT DISTINCT * FROM test.clear_column2 ORDER BY d, i, s;
|
||||
SELECT DISTINCT * FROM test.clear_column2 ORDER BY d, i, s;
|
||||
ALTER TABLE clear_column1 CLEAR COLUMN i IN PARTITION '200002';
|
||||
ALTER TABLE clear_column1 CLEAR COLUMN s IN PARTITION '200002';
|
||||
SELECT DISTINCT * FROM clear_column2 ORDER BY d, i, s;
|
||||
SELECT DISTINCT * FROM clear_column2 ORDER BY d, i, s;
|
||||
|
||||
SELECT 'sizes';
|
||||
SELECT sum(data_uncompressed_bytes) FROM system.columns WHERE database='test' AND table LIKE 'clear_column_' AND (name = 'i' OR name = 's') GROUP BY table;
|
||||
SELECT sum(data_uncompressed_bytes) FROM system.columns WHERE database=currentDatabase() AND table LIKE 'clear_column_' AND (name = 'i' OR name = 's') GROUP BY table;
|
||||
|
||||
-- double call should be OK
|
||||
ALTER TABLE test.clear_column1 CLEAR COLUMN s IN PARTITION '200001';
|
||||
ALTER TABLE test.clear_column1 CLEAR COLUMN s IN PARTITION '200002';
|
||||
ALTER TABLE clear_column1 CLEAR COLUMN s IN PARTITION '200001';
|
||||
ALTER TABLE clear_column1 CLEAR COLUMN s IN PARTITION '200002';
|
||||
|
||||
-- Merges cannot be blocked after all manipulations
|
||||
SET optimize_throw_if_noop = 1;
|
||||
SYSTEM START MERGES;
|
||||
OPTIMIZE TABLE test.clear_column1 PARTITION '200001';
|
||||
OPTIMIZE TABLE test.clear_column1 PARTITION '200002';
|
||||
OPTIMIZE TABLE clear_column1 PARTITION '200001';
|
||||
OPTIMIZE TABLE clear_column1 PARTITION '200002';
|
||||
|
||||
|
||||
-- clear column in empty partition should be Ok
|
||||
ALTER TABLE test.clear_column1 CLEAR COLUMN s IN PARTITION '200012', CLEAR COLUMN i IN PARTITION '200012';
|
||||
ALTER TABLE clear_column1 CLEAR COLUMN s IN PARTITION '200012', CLEAR COLUMN i IN PARTITION '200012';
|
||||
-- Drop empty partition also Ok
|
||||
ALTER TABLE test.clear_column1 DROP PARTITION '200012', DROP PARTITION '200011';
|
||||
ALTER TABLE clear_column1 DROP PARTITION '200012', DROP PARTITION '200011';
|
||||
|
@ -1,33 +1,37 @@
|
||||
DROP TABLE IF EXISTS test.src;
|
||||
DROP TABLE IF EXISTS test.dst;
|
||||
DROP TABLE IF EXISTS test.mv_00508;
|
||||
CREATE DATABASE test_00508;
|
||||
|
||||
CREATE TABLE test.src (x UInt8) ENGINE = Null;
|
||||
CREATE TABLE test.dst (x UInt8) ENGINE = Memory;
|
||||
USE test_00508;
|
||||
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS src;
|
||||
DROP TABLE IF EXISTS dst;
|
||||
DROP TABLE IF EXISTS mv_00508;
|
||||
|
||||
CREATE MATERIALIZED VIEW test.mv_00508 TO dst AS SELECT * FROM src;
|
||||
CREATE TABLE src (x UInt8) ENGINE = Null;
|
||||
CREATE TABLE dst (x UInt8) ENGINE = Memory;
|
||||
|
||||
CREATE MATERIALIZED VIEW mv_00508 TO dst AS SELECT * FROM src;
|
||||
|
||||
INSERT INTO src VALUES (1), (2);
|
||||
SELECT * FROM test.mv_00508 ORDER BY x;
|
||||
SELECT * FROM mv_00508 ORDER BY x;
|
||||
|
||||
-- Detach MV and see if the data is still readable
|
||||
DETACH TABLE test.mv_00508;
|
||||
DETACH TABLE mv_00508;
|
||||
SELECT * FROM dst ORDER BY x;
|
||||
|
||||
USE default;
|
||||
|
||||
-- Reattach MV (shortcut)
|
||||
ATTACH TABLE test.mv_00508;
|
||||
ATTACH TABLE test_00508.mv_00508;
|
||||
|
||||
INSERT INTO test.src VALUES (3);
|
||||
INSERT INTO test_00508.src VALUES (3);
|
||||
|
||||
SELECT * FROM test.mv_00508 ORDER BY x;
|
||||
SELECT * FROM test_00508.mv_00508 ORDER BY x;
|
||||
|
||||
-- Drop the MV and see if the data is still readable
|
||||
DROP TABLE test.mv_00508;
|
||||
SELECT * FROM test.dst ORDER BY x;
|
||||
DROP TABLE test_00508.mv_00508;
|
||||
SELECT * FROM test_00508.dst ORDER BY x;
|
||||
|
||||
DROP TABLE test.src;
|
||||
DROP TABLE test.dst;
|
||||
DROP TABLE test_00508.src;
|
||||
DROP TABLE test_00508.dst;
|
||||
|
||||
DROP DATABASE test_00508;
|
||||
|
@ -1,25 +1,29 @@
|
||||
DROP DATABASE IF EXISTS none;
|
||||
DROP TABLE IF EXISTS test.test_00571;
|
||||
DROP TABLE IF EXISTS test.test_materialized_00571;
|
||||
CREATE DATABASE test_00571;
|
||||
|
||||
USE test;
|
||||
USE test_00571;
|
||||
|
||||
DROP DATABASE IF EXISTS none;
|
||||
DROP TABLE IF EXISTS test_00571;
|
||||
DROP TABLE IF EXISTS test_materialized_00571;
|
||||
|
||||
CREATE DATABASE none;
|
||||
CREATE TABLE test.test_00571 ( date Date, platform Enum8('a' = 0, 'b' = 1, 'c' = 2), app Enum8('a' = 0, 'b' = 1) ) ENGINE = MergeTree(date, (platform, app), 8192);
|
||||
CREATE MATERIALIZED VIEW test.test_materialized_00571 ENGINE = MergeTree(date, (platform, app), 8192) POPULATE AS SELECT date, platform, app FROM (SELECT * FROM test_00571);
|
||||
CREATE TABLE test_00571 ( date Date, platform Enum8('a' = 0, 'b' = 1, 'c' = 2), app Enum8('a' = 0, 'b' = 1) ) ENGINE = MergeTree(date, (platform, app), 8192);
|
||||
CREATE MATERIALIZED VIEW test_materialized_00571 ENGINE = MergeTree(date, (platform, app), 8192) POPULATE AS SELECT date, platform, app FROM (SELECT * FROM test_00571);
|
||||
|
||||
USE none;
|
||||
|
||||
INSERT INTO test.test_00571 VALUES('2018-02-16', 'a', 'a');
|
||||
INSERT INTO test_00571.test_00571 VALUES('2018-02-16', 'a', 'a');
|
||||
|
||||
SELECT * FROM test.test_00571;
|
||||
SELECT * FROM test.test_materialized_00571;
|
||||
SELECT * FROM test_00571.test_00571;
|
||||
SELECT * FROM test_00571.test_materialized_00571;
|
||||
|
||||
DETACH TABLE test.test_materialized_00571;
|
||||
ATTACH TABLE test.test_materialized_00571;
|
||||
DETACH TABLE test_00571.test_materialized_00571;
|
||||
ATTACH TABLE test_00571.test_materialized_00571;
|
||||
|
||||
SELECT * FROM test.test_materialized_00571;
|
||||
SELECT * FROM test_00571.test_materialized_00571;
|
||||
|
||||
DROP DATABASE IF EXISTS none;
|
||||
DROP TABLE IF EXISTS test.test_00571;
|
||||
DROP TABLE IF EXISTS test.test_materialized_00571;
|
||||
DROP TABLE IF EXISTS test_00571.test_00571;
|
||||
DROP TABLE IF EXISTS test_00571.test_materialized_00571;
|
||||
|
||||
DROP DATABASE test_00571;
|
||||
|
@ -1,11 +1,11 @@
|
||||
DROP TABLE IF EXISTS test.numbers1;
|
||||
DROP TABLE IF EXISTS test.numbers2;
|
||||
DROP TABLE IF EXISTS numbers1;
|
||||
DROP TABLE IF EXISTS numbers2;
|
||||
|
||||
CREATE TABLE test.numbers1 ENGINE = Memory AS SELECT number as _table FROM numbers(1000);
|
||||
CREATE TABLE test.numbers2 ENGINE = Memory AS SELECT number as _table FROM numbers(1000);
|
||||
CREATE TABLE numbers1 ENGINE = Memory AS SELECT number as _table FROM numbers(1000);
|
||||
CREATE TABLE numbers2 ENGINE = Memory AS SELECT number as _table FROM numbers(1000);
|
||||
|
||||
SELECT count() FROM merge(test, '^numbers\\d+$') WHERE _table='numbers1'; -- { serverError 43 }
|
||||
SELECT count() FROM merge(test, '^numbers\\d+$') WHERE _table=1;
|
||||
SELECT count() FROM merge(currentDatabase(), '^numbers\\d+$') WHERE _table='numbers1'; -- { serverError 43 }
|
||||
SELECT count() FROM merge(currentDatabase(), '^numbers\\d+$') WHERE _table=1;
|
||||
|
||||
DROP TABLE test.numbers1;
|
||||
DROP TABLE test.numbers2;
|
||||
DROP TABLE numbers1;
|
||||
DROP TABLE numbers2;
|
||||
|
@ -1,18 +1,18 @@
|
||||
DROP TABLE IF EXISTS test.count;
|
||||
DROP TABLE IF EXISTS count;
|
||||
|
||||
CREATE TABLE test.count (x UInt64) ENGINE = MergeTree ORDER BY tuple();
|
||||
INSERT INTO test.count SELECT * FROM numbers(1234567);
|
||||
CREATE TABLE count (x UInt64) ENGINE = MergeTree ORDER BY tuple();
|
||||
INSERT INTO count SELECT * FROM numbers(1234567);
|
||||
|
||||
SELECT count() FROM test.count;
|
||||
SELECT count() * 2 FROM test.count;
|
||||
SELECT count() FROM (SELECT * FROM test.count UNION ALL SELECT * FROM test.count);
|
||||
SELECT count() FROM test.count WITH TOTALS;
|
||||
SELECT arrayJoin([count(), count()]) FROM test.count;
|
||||
SELECT arrayJoin([count(), count()]) FROM test.count LIMIT 1;
|
||||
SELECT arrayJoin([count(), count()]) FROM test.count LIMIT 1, 1;
|
||||
SELECT arrayJoin([count(), count()]) AS x FROM test.count LIMIT 1 BY x;
|
||||
SELECT arrayJoin([count(), count() + 1]) AS x FROM test.count LIMIT 1 BY x;
|
||||
SELECT count() FROM test.count HAVING count() = 1234567;
|
||||
SELECT count() FROM test.count HAVING count() != 1234567;
|
||||
SELECT count() FROM count;
|
||||
SELECT count() * 2 FROM count;
|
||||
SELECT count() FROM (SELECT * FROM count UNION ALL SELECT * FROM count);
|
||||
SELECT count() FROM count WITH TOTALS;
|
||||
SELECT arrayJoin([count(), count()]) FROM count;
|
||||
SELECT arrayJoin([count(), count()]) FROM count LIMIT 1;
|
||||
SELECT arrayJoin([count(), count()]) FROM count LIMIT 1, 1;
|
||||
SELECT arrayJoin([count(), count()]) AS x FROM count LIMIT 1 BY x;
|
||||
SELECT arrayJoin([count(), count() + 1]) AS x FROM count LIMIT 1 BY x;
|
||||
SELECT count() FROM count HAVING count() = 1234567;
|
||||
SELECT count() FROM count HAVING count() != 1234567;
|
||||
|
||||
DROP TABLE test.count;
|
||||
DROP TABLE count;
|
||||
|
@ -1,9 +1,9 @@
|
||||
DROP TABLE IF EXISTS test.count;
|
||||
DROP TABLE IF EXISTS count;
|
||||
|
||||
CREATE TABLE test.count (x UInt64) ENGINE = MergeTree ORDER BY tuple();
|
||||
INSERT INTO test.count SELECT * FROM numbers(1234567);
|
||||
CREATE TABLE count (x UInt64) ENGINE = MergeTree ORDER BY tuple();
|
||||
INSERT INTO count SELECT * FROM numbers(1234567);
|
||||
|
||||
SELECT count() FROM remote('127.0.0.{1,2}', test.count);
|
||||
SELECT count() / 2 FROM remote('127.0.0.{1,2}', test.count);
|
||||
SELECT count() FROM remote('127.0.0.{1,2}', currentDatabase(), count);
|
||||
SELECT count() / 2 FROM remote('127.0.0.{1,2}', currentDatabase(), count);
|
||||
|
||||
DROP TABLE test.count;
|
||||
DROP TABLE count;
|
||||
|
@ -1,9 +1,11 @@
|
||||
DROP TABLE IF EXISTS test.test_00740;
|
||||
DROP TABLE IF EXISTS test.test_view_00740;
|
||||
DROP TABLE IF EXISTS test.test_nested_view_00740;
|
||||
DROP TABLE IF EXISTS test.test_joined_view_00740;
|
||||
CREATE DATABASE test_00740;
|
||||
USE test_00740;
|
||||
|
||||
DROP TABLE IF EXISTS test_00740;
|
||||
DROP TABLE IF EXISTS test_view_00740;
|
||||
DROP TABLE IF EXISTS test_nested_view_00740;
|
||||
DROP TABLE IF EXISTS test_joined_view_00740;
|
||||
|
||||
USE test;
|
||||
CREATE VIEW test_00740 AS SELECT 1 AS N;
|
||||
CREATE VIEW test_view_00740 AS SELECT * FROM test_00740;
|
||||
CREATE VIEW test_nested_view_00740 AS SELECT * FROM (SELECT * FROM test_00740);
|
||||
@ -14,10 +16,12 @@ SELECT * FROM test_nested_view_00740;
|
||||
SELECT * FROM test_joined_view_00740;
|
||||
|
||||
USE default;
|
||||
SELECT * FROM test.test_view_00740;
|
||||
SELECT * FROM test.test_nested_view_00740;
|
||||
SELECT * FROM test.test_joined_view_00740;
|
||||
SELECT * FROM test_00740.test_view_00740;
|
||||
SELECT * FROM test_00740.test_nested_view_00740;
|
||||
SELECT * FROM test_00740.test_joined_view_00740;
|
||||
|
||||
DROP TABLE IF EXISTS test.test_00740;
|
||||
DROP TABLE IF EXISTS test.test_view_00740;
|
||||
DROP TABLE IF EXISTS test.test_nested_view_00740;
|
||||
DROP TABLE IF EXISTS test_00740.test_00740;
|
||||
DROP TABLE IF EXISTS test_00740.test_view_00740;
|
||||
DROP TABLE IF EXISTS test_00740.test_nested_view_00740;
|
||||
|
||||
DROP DATABASE test_00740;
|
||||
|
@ -1,4 +1,4 @@
|
||||
CREATE MATERIALIZED VIEW test.t_mv_00751 (`date` Date, `platform` Enum8('a' = 0, 'b' = 1), `app` Enum8('a' = 0, 'b' = 1)) ENGINE = MergeTree ORDER BY date SETTINGS index_granularity = 8192 AS SELECT date, platform, app FROM test.t_00751 WHERE (app = (SELECT min(app) FROM test.u_00751)) AND (platform = (SELECT (SELECT min(platform) FROM test.v_00751)))
|
||||
CREATE MATERIALIZED VIEW test_00751.t_mv_00751 (`date` Date, `platform` Enum8('a' = 0, 'b' = 1), `app` Enum8('a' = 0, 'b' = 1)) ENGINE = MergeTree ORDER BY date SETTINGS index_granularity = 8192 AS SELECT date, platform, app FROM test_00751.t_00751 WHERE (app = (SELECT min(app) FROM test_00751.u_00751)) AND (platform = (SELECT (SELECT min(platform) FROM test_00751.v_00751)))
|
||||
2000-01-01 a a
|
||||
2000-01-02 b b
|
||||
2000-01-03 a a
|
||||
|
@ -1,4 +1,5 @@
|
||||
USE test;
|
||||
CREATE DATABASE test_00751;
|
||||
USE test_00751;
|
||||
|
||||
DROP TABLE IF EXISTS t_00751;
|
||||
DROP TABLE IF EXISTS t_mv_00751;
|
||||
@ -22,23 +23,25 @@ CREATE MATERIALIZED VIEW t_mv_00751 ENGINE = MergeTree ORDER BY date
|
||||
AS SELECT date, platform, app FROM t_00751
|
||||
WHERE app = (SELECT min(app) from u_00751) AND platform = (SELECT (SELECT min(platform) from v_00751));
|
||||
|
||||
SHOW CREATE TABLE test.t_mv_00751 FORMAT TabSeparatedRaw;
|
||||
SHOW CREATE TABLE test_00751.t_mv_00751 FORMAT TabSeparatedRaw;
|
||||
|
||||
USE default;
|
||||
DETACH TABLE test.t_mv_00751;
|
||||
ATTACH TABLE test.t_mv_00751;
|
||||
DETACH TABLE test_00751.t_mv_00751;
|
||||
ATTACH TABLE test_00751.t_mv_00751;
|
||||
|
||||
INSERT INTO test.t_00751 VALUES ('2000-01-01', 'a', 'a') ('2000-01-02', 'b', 'b');
|
||||
INSERT INTO test_00751.t_00751 VALUES ('2000-01-01', 'a', 'a') ('2000-01-02', 'b', 'b');
|
||||
|
||||
INSERT INTO test.u_00751 VALUES ('a');
|
||||
INSERT INTO test.v_00751 VALUES ('a');
|
||||
INSERT INTO test_00751.u_00751 VALUES ('a');
|
||||
INSERT INTO test_00751.v_00751 VALUES ('a');
|
||||
|
||||
INSERT INTO test.t_00751 VALUES ('2000-01-03', 'a', 'a') ('2000-01-04', 'b', 'b');
|
||||
INSERT INTO test_00751.t_00751 VALUES ('2000-01-03', 'a', 'a') ('2000-01-04', 'b', 'b');
|
||||
|
||||
SELECT * FROM test.t_00751 ORDER BY date;
|
||||
SELECT * FROM test.t_mv_00751 ORDER BY date;
|
||||
SELECT * FROM test_00751.t_00751 ORDER BY date;
|
||||
SELECT * FROM test_00751.t_mv_00751 ORDER BY date;
|
||||
|
||||
DROP TABLE test.t_00751;
|
||||
DROP TABLE test.t_mv_00751;
|
||||
DROP TABLE test.u_00751;
|
||||
DROP TABLE test.v_00751;
|
||||
DROP TABLE test_00751.t_00751;
|
||||
DROP TABLE test_00751.t_mv_00751;
|
||||
DROP TABLE test_00751.u_00751;
|
||||
DROP TABLE test_00751.v_00751;
|
||||
|
||||
DROP DATABASE test_00751;
|
||||
|
@ -1,34 +1,36 @@
|
||||
DROP TABLE IF EXISTS test.join_any_inner;
|
||||
DROP TABLE IF EXISTS test.join_any_left;
|
||||
DROP TABLE IF EXISTS test.join_any_left_null;
|
||||
DROP TABLE IF EXISTS test.join_all_inner;
|
||||
DROP TABLE IF EXISTS test.join_all_left;
|
||||
DROP TABLE IF EXISTS test.join_string_key;
|
||||
CREATE DATABASE test_00800;
|
||||
|
||||
CREATE TABLE test.join_any_inner (s String, x Array(UInt8), k UInt64) ENGINE = Join(ANY, INNER, k);
|
||||
CREATE TABLE test.join_any_left (s String, x Array(UInt8), k UInt64) ENGINE = Join(ANY, LEFT, k);
|
||||
CREATE TABLE test.join_all_inner (s String, x Array(UInt8), k UInt64) ENGINE = Join(ALL, INNER, k);
|
||||
CREATE TABLE test.join_all_left (s String, x Array(UInt8), k UInt64) ENGINE = Join(ALL, LEFT, k);
|
||||
USE test_00800;
|
||||
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS join_any_inner;
|
||||
DROP TABLE IF EXISTS join_any_left;
|
||||
DROP TABLE IF EXISTS join_any_left_null;
|
||||
DROP TABLE IF EXISTS join_all_inner;
|
||||
DROP TABLE IF EXISTS join_all_left;
|
||||
DROP TABLE IF EXISTS join_string_key;
|
||||
|
||||
INSERT INTO test.join_any_inner VALUES ('abc', [0], 1), ('def', [1, 2], 2);
|
||||
INSERT INTO test.join_any_left VALUES ('abc', [0], 1), ('def', [1, 2], 2);
|
||||
INSERT INTO test.join_all_inner VALUES ('abc', [0], 1), ('def', [1, 2], 2);
|
||||
INSERT INTO test.join_all_left VALUES ('abc', [0], 1), ('def', [1, 2], 2);
|
||||
CREATE TABLE join_any_inner (s String, x Array(UInt8), k UInt64) ENGINE = Join(ANY, INNER, k);
|
||||
CREATE TABLE join_any_left (s String, x Array(UInt8), k UInt64) ENGINE = Join(ANY, LEFT, k);
|
||||
CREATE TABLE join_all_inner (s String, x Array(UInt8), k UInt64) ENGINE = Join(ALL, INNER, k);
|
||||
CREATE TABLE join_all_left (s String, x Array(UInt8), k UInt64) ENGINE = Join(ALL, LEFT, k);
|
||||
|
||||
INSERT INTO join_any_inner VALUES ('abc', [0], 1), ('def', [1, 2], 2);
|
||||
INSERT INTO join_any_left VALUES ('abc', [0], 1), ('def', [1, 2], 2);
|
||||
INSERT INTO join_all_inner VALUES ('abc', [0], 1), ('def', [1, 2], 2);
|
||||
INSERT INTO join_all_left VALUES ('abc', [0], 1), ('def', [1, 2], 2);
|
||||
|
||||
-- read from StorageJoin
|
||||
|
||||
SELECT '--------read--------';
|
||||
SELECT * from test.join_any_inner;
|
||||
SELECT * from test.join_any_left;
|
||||
SELECT * from test.join_all_inner;
|
||||
SELECT * from test.join_all_left;
|
||||
SELECT * from join_any_inner;
|
||||
SELECT * from join_any_left;
|
||||
SELECT * from join_all_inner;
|
||||
SELECT * from join_all_left;
|
||||
|
||||
-- create StorageJoin tables with customized settings
|
||||
|
||||
CREATE TABLE test.join_any_left_null (s String, k UInt64) ENGINE = Join(ANY, LEFT, k) SETTINGS join_use_nulls = 1;
|
||||
INSERT INTO test.join_any_left_null VALUES ('abc', 1), ('def', 2);
|
||||
CREATE TABLE join_any_left_null (s String, k UInt64) ENGINE = Join(ANY, LEFT, k) SETTINGS join_use_nulls = 1;
|
||||
INSERT INTO join_any_left_null VALUES ('abc', 1), ('def', 2);
|
||||
|
||||
-- joinGet
|
||||
SELECT '--------joinGet--------';
|
||||
@ -41,31 +43,31 @@ SELECT '';
|
||||
|
||||
SELECT joinGet(join_any_left, 's', number) FROM numbers(3);
|
||||
SELECT '';
|
||||
SELECT joinGet(test.join_any_left_null, 's', number) FROM numbers(3);
|
||||
SELECT joinGet(join_any_left_null, 's', number) FROM numbers(3);
|
||||
SELECT '';
|
||||
|
||||
CREATE TABLE test.join_string_key (s String, x Array(UInt8), k UInt64) ENGINE = Join(ANY, LEFT, s);
|
||||
INSERT INTO test.join_string_key VALUES ('abc', [0], 1), ('def', [1, 2], 2);
|
||||
CREATE TABLE join_string_key (s String, x Array(UInt8), k UInt64) ENGINE = Join(ANY, LEFT, s);
|
||||
INSERT INTO join_string_key VALUES ('abc', [0], 1), ('def', [1, 2], 2);
|
||||
SELECT joinGet('join_string_key', 'x', 'abc'), joinGet('join_string_key', 'k', 'abc');
|
||||
|
||||
USE default;
|
||||
|
||||
DROP TABLE test.join_any_inner;
|
||||
DROP TABLE test.join_any_left;
|
||||
DROP TABLE test.join_any_left_null;
|
||||
DROP TABLE test.join_all_inner;
|
||||
DROP TABLE test.join_all_left;
|
||||
DROP TABLE test.join_string_key;
|
||||
DROP TABLE test_00800.join_any_inner;
|
||||
DROP TABLE test_00800.join_any_left;
|
||||
DROP TABLE test_00800.join_any_left_null;
|
||||
DROP TABLE test_00800.join_all_inner;
|
||||
DROP TABLE test_00800.join_all_left;
|
||||
DROP TABLE test_00800.join_string_key;
|
||||
|
||||
-- test provided by Alexander Zaitsev
|
||||
DROP TABLE IF EXISTS test.join_test;
|
||||
CREATE TABLE test.join_test (a UInt8, b UInt8) Engine = Join(ANY, LEFT, a);
|
||||
DROP TABLE IF EXISTS test_00800.join_test;
|
||||
CREATE TABLE test_00800.join_test (a UInt8, b UInt8) Engine = Join(ANY, LEFT, a);
|
||||
|
||||
USE test;
|
||||
USE test_00800;
|
||||
select joinGet('join_test', 'b', 1);
|
||||
|
||||
USE system;
|
||||
SELECT joinGet('test.join_test', 'b', 1);
|
||||
SELECT joinGet('test_00800.join_test', 'b', 1);
|
||||
|
||||
USE default;
|
||||
DROP TABLE test.join_test;
|
||||
DROP TABLE test_00800.join_test;
|
||||
|
@ -1,6 +1,6 @@
|
||||
DROP TABLE IF EXISTS test.t64;
|
||||
DROP TABLE IF EXISTS t64;
|
||||
|
||||
CREATE TABLE test.t64
|
||||
CREATE TABLE t64
|
||||
(
|
||||
u8 UInt8,
|
||||
t_u8 UInt8 Codec(T64, ZSTD),
|
||||
@ -12,90 +12,90 @@ CREATE TABLE test.t64
|
||||
t_u64 UInt64 Codec(T64, ZSTD)
|
||||
) ENGINE MergeTree() ORDER BY tuple();
|
||||
|
||||
INSERT INTO test.t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(1);
|
||||
INSERT INTO test.t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(2);
|
||||
INSERT INTO test.t64 SELECT 42 AS x, x, x, x, x, x, x, x FROM numbers(4);
|
||||
INSERT INTO t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(1);
|
||||
INSERT INTO t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(2);
|
||||
INSERT INTO t64 SELECT 42 AS x, x, x, x, x, x, x, x FROM numbers(4);
|
||||
|
||||
SELECT * FROM test.t64 ORDER BY u64;
|
||||
SELECT * FROM t64 ORDER BY u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(8));
|
||||
INSERT INTO test.t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(9));
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(8));
|
||||
INSERT INTO t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(9));
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(128);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(128);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(256);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(257);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(257);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(256);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(257);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(257);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(512);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(512);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1024);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1024);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2048);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2048);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(63) + number * intExp2(62)) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(63) + number * intExp2(62)) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
OPTIMIZE TABLE test.t64 FINAL;
|
||||
OPTIMIZE TABLE t64 FINAL;
|
||||
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
DROP TABLE test.t64;
|
||||
DROP TABLE t64;
|
||||
|
@ -1,6 +1,6 @@
|
||||
DROP TABLE IF EXISTS test.t64;
|
||||
DROP TABLE IF EXISTS t64;
|
||||
|
||||
CREATE TABLE test.t64
|
||||
CREATE TABLE t64
|
||||
(
|
||||
i8 Int8,
|
||||
t_i8 Int8 Codec(T64, LZ4),
|
||||
@ -12,117 +12,117 @@ CREATE TABLE test.t64
|
||||
t_i64 Int64 Codec(T64, LZ4)
|
||||
) ENGINE MergeTree() ORDER BY tuple();
|
||||
|
||||
INSERT INTO test.t64 SELECT toInt32(number)-1 AS x, x, x, x, x, x, x, x FROM numbers(2);
|
||||
INSERT INTO test.t64 SELECT toInt32(number)-1 AS x, x, x, x, x, x, x, x FROM numbers(3);
|
||||
INSERT INTO test.t64 SELECT 42 AS x, x, x, x, x, x, x, x FROM numbers(4);
|
||||
INSERT INTO t64 SELECT toInt32(number)-1 AS x, x, x, x, x, x, x, x FROM numbers(2);
|
||||
INSERT INTO t64 SELECT toInt32(number)-1 AS x, x, x, x, x, x, x, x FROM numbers(3);
|
||||
INSERT INTO t64 SELECT 42 AS x, x, x, x, x, x, x, x FROM numbers(4);
|
||||
|
||||
SELECT * FROM test.t64 ORDER BY i64;
|
||||
SELECT * FROM t64 ORDER BY i64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(8) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
SELECT i8, t_i8 FROM test.t64 WHERE i8 != t_i8;
|
||||
INSERT INTO t64 SELECT (intExp2(8) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
SELECT i8, t_i8 FROM t64 WHERE i8 != t_i8;
|
||||
|
||||
INSERT INTO test.t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(8));
|
||||
INSERT INTO test.t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(9));
|
||||
SELECT * FROM test.t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM test.t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM test.t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM test.t64 WHERE i64 != t_i64;
|
||||
INSERT INTO t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(8));
|
||||
INSERT INTO t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(9));
|
||||
SELECT * FROM t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM t64 WHERE i64 != t_i64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(16)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(16)) + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(16)) + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(16)) + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO test.t64 SELECT (1 - toInt64(intExp2(16)) + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
SELECT * FROM test.t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM test.t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM test.t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM test.t64 WHERE i64 != t_i64;
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(16)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(16)) + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(16)) + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(16)) + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO t64 SELECT (1 - toInt64(intExp2(16)) + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
SELECT * FROM t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM t64 WHERE i64 != t_i64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(128);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(24)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(24)) + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(24)) + number) AS x, x, x, x, x, x, x, x FROM numbers(128);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(24)) + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
INSERT INTO test.t64 SELECT (1 - toInt64(intExp2(24)) + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
SELECT * FROM test.t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM test.t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM test.t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM test.t64 WHERE i64 != t_i64;
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(128);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(24)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(24)) + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(24)) + number) AS x, x, x, x, x, x, x, x FROM numbers(128);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(24)) + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
INSERT INTO t64 SELECT (1 - toInt64(intExp2(24)) + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
SELECT * FROM t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM t64 WHERE i64 != t_i64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 2 + number) AS x, x, x, x, x, x, x, x FROM numbers(2);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 2 + number) AS x, x, x, x, x, x, x, x FROM numbers(3);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(32)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(32)) + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(32)) + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(32)) + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO test.t64 SELECT (1 - toInt64(intExp2(32)) + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
SELECT * FROM test.t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM test.t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM test.t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM test.t64 WHERE i64 != t_i64;
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 2 + number) AS x, x, x, x, x, x, x, x FROM numbers(2);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 2 + number) AS x, x, x, x, x, x, x, x FROM numbers(3);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(32)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(32)) + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(32)) + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(32)) + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO t64 SELECT (1 - toInt64(intExp2(32)) + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
SELECT * FROM t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM t64 WHERE i64 != t_i64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(512);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(40)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(40)) + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(40)) + number) AS x, x, x, x, x, x, x, x FROM numbers(512);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(40)) + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
INSERT INTO test.t64 SELECT (1 - toInt64(intExp2(40)) + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
SELECT * FROM test.t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM test.t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM test.t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM test.t64 WHERE i64 != t_i64;
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(512);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(40)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(40)) + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(40)) + number) AS x, x, x, x, x, x, x, x FROM numbers(512);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(40)) + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
INSERT INTO t64 SELECT (1 - toInt64(intExp2(40)) + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
SELECT * FROM t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM t64 WHERE i64 != t_i64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1024);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(48)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(48)) + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(48)) + number) AS x, x, x, x, x, x, x, x FROM numbers(1024);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(48)) + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
INSERT INTO test.t64 SELECT (1 - toInt64(intExp2(48)) + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
SELECT * FROM test.t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM test.t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM test.t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM test.t64 WHERE i64 != t_i64;
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1024);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(48)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(48)) + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(48)) + number) AS x, x, x, x, x, x, x, x FROM numbers(1024);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(48)) + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
INSERT INTO t64 SELECT (1 - toInt64(intExp2(48)) + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
SELECT * FROM t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM t64 WHERE i64 != t_i64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2048);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(56)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (10 - toInt64(intExp2(56)) + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(56)) + number) AS x, x, x, x, x, x, x, x FROM numbers(2048);
|
||||
INSERT INTO test.t64 SELECT (64 - toInt64(intExp2(56)) + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
INSERT INTO test.t64 SELECT (1 - toInt64(intExp2(56)) + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
SELECT * FROM test.t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM test.t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM test.t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM test.t64 WHERE i64 != t_i64;
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2048);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(56)) + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (10 - toInt64(intExp2(56)) + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(56)) + number) AS x, x, x, x, x, x, x, x FROM numbers(2048);
|
||||
INSERT INTO t64 SELECT (64 - toInt64(intExp2(56)) + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
INSERT INTO t64 SELECT (1 - toInt64(intExp2(56)) + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
SELECT * FROM t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM t64 WHERE i64 != t_i64;
|
||||
|
||||
OPTIMIZE TABLE test.t64 FINAL;
|
||||
OPTIMIZE TABLE t64 FINAL;
|
||||
|
||||
SELECT * FROM test.t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM test.t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM test.t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM test.t64 WHERE i64 != t_i64;
|
||||
SELECT * FROM t64 WHERE i8 != t_i8;
|
||||
SELECT * FROM t64 WHERE i16 != t_i16;
|
||||
SELECT * FROM t64 WHERE i32 != t_i32;
|
||||
SELECT * FROM t64 WHERE i64 != t_i64;
|
||||
|
||||
DROP TABLE test.t64;
|
||||
DROP TABLE t64;
|
||||
|
@ -1,6 +1,6 @@
|
||||
DROP TABLE IF EXISTS test.t64;
|
||||
DROP TABLE IF EXISTS t64;
|
||||
|
||||
CREATE TABLE test.t64
|
||||
CREATE TABLE t64
|
||||
(
|
||||
u8 UInt8,
|
||||
t_u8 UInt8 Codec(T64('bit'), LZ4),
|
||||
@ -12,90 +12,90 @@ CREATE TABLE test.t64
|
||||
t_u64 UInt64 Codec(T64('bit'), LZ4)
|
||||
) ENGINE MergeTree() ORDER BY tuple();
|
||||
|
||||
INSERT INTO test.t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(1);
|
||||
INSERT INTO test.t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(2);
|
||||
INSERT INTO test.t64 SELECT 42 AS x, x, x, x, x, x, x, x FROM numbers(4);
|
||||
INSERT INTO t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(1);
|
||||
INSERT INTO t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(2);
|
||||
INSERT INTO t64 SELECT 42 AS x, x, x, x, x, x, x, x FROM numbers(4);
|
||||
|
||||
SELECT * FROM test.t64 ORDER BY u64;
|
||||
SELECT * FROM t64 ORDER BY u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(8));
|
||||
INSERT INTO test.t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(9));
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(8));
|
||||
INSERT INTO t64 SELECT number AS x, x, x, x, x, x, x, x FROM numbers(intExp2(9));
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO test.t64 SELECT (intExp2(16) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(64);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
INSERT INTO t64 SELECT (intExp2(16) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(65);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(128);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
INSERT INTO test.t64 SELECT (intExp2(24) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(11);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(128);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
INSERT INTO t64 SELECT (intExp2(24) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(129);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(256);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(257);
|
||||
INSERT INTO test.t64 SELECT (intExp2(32) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(257);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(256);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(257);
|
||||
INSERT INTO t64 SELECT (intExp2(32) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(257);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(512);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
INSERT INTO test.t64 SELECT (intExp2(40) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(512);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
INSERT INTO t64 SELECT (intExp2(40) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(513);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1024);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
INSERT INTO test.t64 SELECT (intExp2(48) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1024);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
INSERT INTO t64 SELECT (intExp2(48) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(1025);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2048);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
INSERT INTO test.t64 SELECT (intExp2(56) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 10 + number) AS x, x, x, x, x, x, x, x FROM numbers(20);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2048);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 64 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
INSERT INTO t64 SELECT (intExp2(56) - 1 + number) AS x, x, x, x, x, x, x, x FROM numbers(2049);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
INSERT INTO test.t64 SELECT (intExp2(63) + number * intExp2(62)) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
INSERT INTO t64 SELECT (intExp2(63) + number * intExp2(62)) AS x, x, x, x, x, x, x, x FROM numbers(10);
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
OPTIMIZE TABLE test.t64 FINAL;
|
||||
OPTIMIZE TABLE t64 FINAL;
|
||||
|
||||
SELECT * FROM test.t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM test.t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM test.t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM test.t64 WHERE u64 != t_u64;
|
||||
SELECT * FROM t64 WHERE u8 != t_u8;
|
||||
SELECT * FROM t64 WHERE u16 != t_u16;
|
||||
SELECT * FROM t64 WHERE u32 != t_u32;
|
||||
SELECT * FROM t64 WHERE u64 != t_u64;
|
||||
|
||||
DROP TABLE test.t64;
|
||||
DROP TABLE t64;
|
||||
|
@ -1,5 +1,3 @@
|
||||
USE test;
|
||||
|
||||
DROP TABLE IF EXISTS A;
|
||||
|
||||
SELECT CAST(1 as DateTime64('abc')); -- { serverError 43 } # Invalid scale parameter type
|
||||
|
@ -1,5 +1,3 @@
|
||||
USE test;
|
||||
|
||||
DROP TABLE IF EXISTS table1;
|
||||
|
||||
CREATE TABLE table1 (lat Float64, lon Float64, resolution UInt8) ENGINE = Memory;
|
||||
|
@ -1,5 +1,3 @@
|
||||
USE test;
|
||||
|
||||
DROP TABLE IF EXISTS table1;
|
||||
|
||||
CREATE TABLE table1 (str1 String, str2 String) ENGINE = Memory;
|
||||
|
@ -52,4 +52,4 @@ CREATE TABLE pk_order (a Int, b Int) ENGINE = MergeTree ORDER BY (a / b);
|
||||
INSERT INTO pk_order SELECT number % 10 + 1, number % 6 + 1 from numbers(100);
|
||||
SELECT * FROM pk_order ORDER BY (a / b), a LIMIT 5;
|
||||
|
||||
|
||||
DROP TABLE pk_order;
|
||||
|
@ -1,265 +1,265 @@
|
||||
|
||||
DROP TABLE IF EXISTS test.single_column_bloom_filter;
|
||||
DROP TABLE IF EXISTS single_column_bloom_filter;
|
||||
|
||||
CREATE TABLE test.single_column_bloom_filter (u64 UInt64, i32 Int32, i64 UInt64, INDEX idx (i32) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY u64 SETTINGS index_granularity = 6;
|
||||
CREATE TABLE single_column_bloom_filter (u64 UInt64, i32 Int32, i64 UInt64, INDEX idx (i32) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY u64 SETTINGS index_granularity = 6;
|
||||
|
||||
INSERT INTO test.single_column_bloom_filter SELECT number AS u64, number AS i32, number AS i64 FROM system.numbers LIMIT 100;
|
||||
INSERT INTO single_column_bloom_filter SELECT number AS u64, number AS i32, number AS i64 FROM system.numbers LIMIT 100;
|
||||
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE i32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i32, i32) = (1, 2) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i32, i64) = (1, 1) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i64, (i64, i32)) = (1, (1, 1)) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE i32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE (i32, i32) = (1, 2) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE (i32, i64) = (1, 1) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE (i64, (i64, i32)) = (1, (1, 1)) SETTINGS max_rows_to_read = 6;
|
||||
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE i32 IN (1, 2) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i32, i32) IN ((1, 2), (2, 3)) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i32, i64) IN ((1, 1), (2, 2)) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i64, (i64, i32)) IN ((1, (1, 1)), (2, (2, 2))) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE i32 IN (SELECT arrayJoin([toInt32(1), toInt32(2)])) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i32, i32) IN (SELECT arrayJoin([(toInt32(1), toInt32(2)), (toInt32(2), toInt32(3))])) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i32, i64) IN (SELECT arrayJoin([(toInt32(1), toUInt64(1)), (toInt32(2), toUInt64(2))])) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i64, (i64, i32)) IN (SELECT arrayJoin([(toUInt64(1), (toUInt64(1), toInt32(1))), (toUInt64(2), (toUInt64(2), toInt32(2)))])) SETTINGS max_rows_to_read = 6;
|
||||
WITH (1, 2) AS liter_prepared_set SELECT COUNT() FROM test.single_column_bloom_filter WHERE i32 IN liter_prepared_set SETTINGS max_rows_to_read = 6;
|
||||
WITH ((1, 2), (2, 3)) AS liter_prepared_set SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i32, i32) IN liter_prepared_set SETTINGS max_rows_to_read = 6;
|
||||
WITH ((1, 1), (2, 2)) AS liter_prepared_set SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i32, i64) IN liter_prepared_set SETTINGS max_rows_to_read = 6;
|
||||
WITH ((1, (1, 1)), (2, (2, 2))) AS liter_prepared_set SELECT COUNT() FROM test.single_column_bloom_filter WHERE (i64, (i64, i32)) IN liter_prepared_set SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE i32 IN (1, 2) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE (i32, i32) IN ((1, 2), (2, 3)) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE (i32, i64) IN ((1, 1), (2, 2)) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE (i64, (i64, i32)) IN ((1, (1, 1)), (2, (2, 2))) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE i32 IN (SELECT arrayJoin([toInt32(1), toInt32(2)])) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE (i32, i32) IN (SELECT arrayJoin([(toInt32(1), toInt32(2)), (toInt32(2), toInt32(3))])) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE (i32, i64) IN (SELECT arrayJoin([(toInt32(1), toUInt64(1)), (toInt32(2), toUInt64(2))])) SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM single_column_bloom_filter WHERE (i64, (i64, i32)) IN (SELECT arrayJoin([(toUInt64(1), (toUInt64(1), toInt32(1))), (toUInt64(2), (toUInt64(2), toInt32(2)))])) SETTINGS max_rows_to_read = 6;
|
||||
WITH (1, 2) AS liter_prepared_set SELECT COUNT() FROM single_column_bloom_filter WHERE i32 IN liter_prepared_set SETTINGS max_rows_to_read = 6;
|
||||
WITH ((1, 2), (2, 3)) AS liter_prepared_set SELECT COUNT() FROM single_column_bloom_filter WHERE (i32, i32) IN liter_prepared_set SETTINGS max_rows_to_read = 6;
|
||||
WITH ((1, 1), (2, 2)) AS liter_prepared_set SELECT COUNT() FROM single_column_bloom_filter WHERE (i32, i64) IN liter_prepared_set SETTINGS max_rows_to_read = 6;
|
||||
WITH ((1, (1, 1)), (2, (2, 2))) AS liter_prepared_set SELECT COUNT() FROM single_column_bloom_filter WHERE (i64, (i64, i32)) IN liter_prepared_set SETTINGS max_rows_to_read = 6;
|
||||
|
||||
DROP TABLE IF EXISTS test.single_column_bloom_filter;
|
||||
DROP TABLE IF EXISTS single_column_bloom_filter;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_types_test;
|
||||
DROP TABLE IF EXISTS bloom_filter_types_test;
|
||||
|
||||
CREATE TABLE test.bloom_filter_types_test (order_key UInt64, i8 Int8, i16 Int16, i32 Int32, i64 Int64, u8 UInt8, u16 UInt16, u32 UInt32, u64 UInt64, f32 Float32, f64 Float64, date Date, date_time DateTime('Europe/Moscow'), str String, fixed_string FixedString(5), INDEX idx (i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, date, date_time, str, fixed_string) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 6;
|
||||
INSERT INTO test.bloom_filter_types_test SELECT number AS order_key, toInt8(number) AS i8, toInt16(number) AS i16, toInt32(number) AS i32, toInt64(number) AS i64, toUInt8(number) AS u8, toUInt16(number) AS u16, toUInt32(number) AS u32, toUInt64(number) AS u64, toFloat32(number) AS f32, toFloat64(number) AS f64, toDate(number, 'Europe/Moscow') AS date, toDateTime(number, 'Europe/Moscow') AS date_time, toString(number) AS str, toFixedString(toString(number), 5) AS fixed_string FROM system.numbers LIMIT 100;
|
||||
CREATE TABLE bloom_filter_types_test (order_key UInt64, i8 Int8, i16 Int16, i32 Int32, i64 Int64, u8 UInt8, u16 UInt16, u32 UInt32, u64 UInt64, f32 Float32, f64 Float64, date Date, date_time DateTime('Europe/Moscow'), str String, fixed_string FixedString(5), INDEX idx (i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, date, date_time, str, fixed_string) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 6;
|
||||
INSERT INTO bloom_filter_types_test SELECT number AS order_key, toInt8(number) AS i8, toInt16(number) AS i16, toInt32(number) AS i32, toInt64(number) AS i64, toUInt8(number) AS u8, toUInt16(number) AS u16, toUInt32(number) AS u32, toUInt64(number) AS u64, toFloat32(number) AS f32, toFloat64(number) AS f64, toDate(number, 'Europe/Moscow') AS date, toDateTime(number, 'Europe/Moscow') AS date_time, toString(number) AS str, toFixedString(toString(number), 5) AS fixed_string FROM system.numbers LIMIT 100;
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE i8 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE i16 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE i32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE i64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE u8 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE u16 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE u32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE u64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE f32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE f64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE date = '1970-01-02' SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE date_time = toDateTime('1970-01-01 03:00:01', 'Europe/Moscow') SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE str = '1' SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE fixed_string = toFixedString('1', 5) SETTINGS max_rows_to_read = 12;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE i8 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE i16 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE i32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE i64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE u8 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE u16 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE u32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE u64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE f32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE f64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE date = '1970-01-02' SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE date_time = toDateTime('1970-01-01 03:00:01', 'Europe/Moscow') SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE str = '1' SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE fixed_string = toFixedString('1', 5) SETTINGS max_rows_to_read = 12;
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_types_test WHERE str IN ( SELECT str FROM test.bloom_filter_types_test);
|
||||
SELECT COUNT() FROM bloom_filter_types_test WHERE str IN ( SELECT str FROM bloom_filter_types_test);
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_types_test;
|
||||
DROP TABLE IF EXISTS bloom_filter_types_test;
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_array_types_test;
|
||||
DROP TABLE IF EXISTS bloom_filter_array_types_test;
|
||||
|
||||
CREATE TABLE test.bloom_filter_array_types_test (order_key Array(UInt64), i8 Array(Int8), i16 Array(Int16), i32 Array(Int32), i64 Array(Int64), u8 Array(UInt8), u16 Array(UInt16), u32 Array(UInt32), u64 Array(UInt64), f32 Array(Float32), f64 Array(Float64), date Array(Date), date_time Array(DateTime('Europe/Moscow')), str Array(String), fixed_string Array(FixedString(5)), INDEX idx (i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, date, date_time, str, fixed_string) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 6;
|
||||
INSERT INTO test.bloom_filter_array_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers LIMIT 15);
|
||||
INSERT INTO test.bloom_filter_array_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers WHERE number >= 5 LIMIT 15);
|
||||
INSERT INTO test.bloom_filter_array_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers WHERE number >= 10 LIMIT 15);
|
||||
CREATE TABLE bloom_filter_array_types_test (order_key Array(UInt64), i8 Array(Int8), i16 Array(Int16), i32 Array(Int32), i64 Array(Int64), u8 Array(UInt8), u16 Array(UInt16), u32 Array(UInt32), u64 Array(UInt64), f32 Array(Float32), f64 Array(Float64), date Array(Date), date_time Array(DateTime('Europe/Moscow')), str Array(String), fixed_string Array(FixedString(5)), INDEX idx (i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, date, date_time, str, fixed_string) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 6;
|
||||
INSERT INTO bloom_filter_array_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers LIMIT 15);
|
||||
INSERT INTO bloom_filter_array_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers WHERE number >= 5 LIMIT 15);
|
||||
INSERT INTO bloom_filter_array_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers WHERE number >= 10 LIMIT 15);
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i8, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i16, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i32, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i64, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u8, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u16, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u32, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u64, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(f32, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(f64, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(date, toDate('1970-01-02'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:01', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(str, '1');
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(fixed_string, toFixedString('1', 5));
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i8, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i16, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i32, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i64, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u8, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u16, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u32, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u64, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(f32, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(f64, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(date, toDate('1970-01-02'));
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:01', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(str, '1');
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(fixed_string, toFixedString('1', 5));
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i8, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i16, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i32, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i64, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u8, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u16, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u32, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u64, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(f32, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(f64, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(date, toDate('1970-01-06'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:05', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(str, '5');
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(fixed_string, toFixedString('5', 5));
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i8, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i16, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i32, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i64, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u8, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u16, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u32, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u64, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(f32, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(f64, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(date, toDate('1970-01-06'));
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:05', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(str, '5');
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(fixed_string, toFixedString('5', 5));
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i8, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i16, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i32, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(i64, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u8, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u16, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u32, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(u64, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(f32, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(f64, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(date, toDate('1970-01-11'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:10', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(str, '10');
|
||||
SELECT COUNT() FROM test.bloom_filter_array_types_test WHERE has(fixed_string, toFixedString('10', 5));
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i8, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i16, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i32, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(i64, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u8, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u16, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u32, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(u64, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(f32, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(f64, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(date, toDate('1970-01-11'));
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:10', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(str, '10');
|
||||
SELECT COUNT() FROM bloom_filter_array_types_test WHERE has(fixed_string, toFixedString('10', 5));
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_array_types_test;
|
||||
DROP TABLE IF EXISTS bloom_filter_array_types_test;
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_null_types_test;
|
||||
DROP TABLE IF EXISTS bloom_filter_null_types_test;
|
||||
|
||||
CREATE TABLE test.bloom_filter_null_types_test (order_key UInt64, i8 Nullable(Int8), i16 Nullable(Int16), i32 Nullable(Int32), i64 Nullable(Int64), u8 Nullable(UInt8), u16 Nullable(UInt16), u32 Nullable(UInt32), u64 Nullable(UInt64), f32 Nullable(Float32), f64 Nullable(Float64), date Nullable(Date), date_time Nullable(DateTime('Europe/Moscow')), str Nullable(String), fixed_string Nullable(FixedString(5)), INDEX idx (i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, date, date_time, str, fixed_string) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 6;
|
||||
INSERT INTO test.bloom_filter_null_types_test SELECT number AS order_key, toInt8(number) AS i8, toInt16(number) AS i16, toInt32(number) AS i32, toInt64(number) AS i64, toUInt8(number) AS u8, toUInt16(number) AS u16, toUInt32(number) AS u32, toUInt64(number) AS u64, toFloat32(number) AS f32, toFloat64(number) AS f64, toDate(number, 'Europe/Moscow') AS date, toDateTime(number, 'Europe/Moscow') AS date_time, toString(number) AS str, toFixedString(toString(number), 5) AS fixed_string FROM system.numbers LIMIT 100;
|
||||
INSERT INTO test.bloom_filter_null_types_test SELECT 0 AS order_key, NULL AS i8, NULL AS i16, NULL AS i32, NULL AS i64, NULL AS u8, NULL AS u16, NULL AS u32, NULL AS u64, NULL AS f32, NULL AS f64, NULL AS date, NULL AS date_time, NULL AS str, NULL AS fixed_string;
|
||||
CREATE TABLE bloom_filter_null_types_test (order_key UInt64, i8 Nullable(Int8), i16 Nullable(Int16), i32 Nullable(Int32), i64 Nullable(Int64), u8 Nullable(UInt8), u16 Nullable(UInt16), u32 Nullable(UInt32), u64 Nullable(UInt64), f32 Nullable(Float32), f64 Nullable(Float64), date Nullable(Date), date_time Nullable(DateTime('Europe/Moscow')), str Nullable(String), fixed_string Nullable(FixedString(5)), INDEX idx (i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, date, date_time, str, fixed_string) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 6;
|
||||
INSERT INTO bloom_filter_null_types_test SELECT number AS order_key, toInt8(number) AS i8, toInt16(number) AS i16, toInt32(number) AS i32, toInt64(number) AS i64, toUInt8(number) AS u8, toUInt16(number) AS u16, toUInt32(number) AS u32, toUInt64(number) AS u64, toFloat32(number) AS f32, toFloat64(number) AS f64, toDate(number, 'Europe/Moscow') AS date, toDateTime(number, 'Europe/Moscow') AS date_time, toString(number) AS str, toFixedString(toString(number), 5) AS fixed_string FROM system.numbers LIMIT 100;
|
||||
INSERT INTO bloom_filter_null_types_test SELECT 0 AS order_key, NULL AS i8, NULL AS i16, NULL AS i32, NULL AS i64, NULL AS u8, NULL AS u16, NULL AS u32, NULL AS u64, NULL AS f32, NULL AS f64, NULL AS date, NULL AS date_time, NULL AS str, NULL AS fixed_string;
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE i8 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE i16 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE i32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE i64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE u8 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE u16 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE u32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE u64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE f32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE f64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE date = '1970-01-02' SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE date_time = toDateTime('1970-01-01 03:00:01', 'Europe/Moscow') SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE str = '1' SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE fixed_string = toFixedString('1', 5) SETTINGS max_rows_to_read = 12;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE i8 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE i16 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE i32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE i64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE u8 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE u16 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE u32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE u64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE f32 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE f64 = 1 SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE date = '1970-01-02' SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE date_time = toDateTime('1970-01-01 03:00:01', 'Europe/Moscow') SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE str = '1' SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE fixed_string = toFixedString('1', 5) SETTINGS max_rows_to_read = 12;
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(i8);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(i16);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(i32);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(i64);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(u8);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(u16);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(u32);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(u64);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(f32);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(f64);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(date);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(date_time);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(str);
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE isNull(fixed_string);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(i8);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(i16);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(i32);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(i64);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(u8);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(u16);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(u32);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(u64);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(f32);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(f64);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(date);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(date_time);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(str);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE isNull(fixed_string);
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_null_types_test WHERE str IN ( SELECT str FROM test.bloom_filter_null_types_test);
|
||||
SELECT COUNT() FROM bloom_filter_null_types_test WHERE str IN ( SELECT str FROM bloom_filter_null_types_test);
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_null_types_test;
|
||||
DROP TABLE IF EXISTS bloom_filter_null_types_test;
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_lc_null_types_test;
|
||||
DROP TABLE IF EXISTS bloom_filter_lc_null_types_test;
|
||||
|
||||
CREATE TABLE test.bloom_filter_lc_null_types_test (order_key UInt64, str LowCardinality(Nullable(String)), fixed_string LowCardinality(Nullable(FixedString(5))), INDEX idx (str, fixed_string) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 6;
|
||||
INSERT INTO test.bloom_filter_lc_null_types_test SELECT number AS order_key, toString(number) AS str, toFixedString(toString(number), 5) AS fixed_string FROM system.numbers LIMIT 100;
|
||||
INSERT INTO test.bloom_filter_lc_null_types_test SELECT 0 AS order_key, NULL AS str, NULL AS fixed_string;
|
||||
CREATE TABLE bloom_filter_lc_null_types_test (order_key UInt64, str LowCardinality(Nullable(String)), fixed_string LowCardinality(Nullable(FixedString(5))), INDEX idx (str, fixed_string) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 6;
|
||||
INSERT INTO bloom_filter_lc_null_types_test SELECT number AS order_key, toString(number) AS str, toFixedString(toString(number), 5) AS fixed_string FROM system.numbers LIMIT 100;
|
||||
INSERT INTO bloom_filter_lc_null_types_test SELECT 0 AS order_key, NULL AS str, NULL AS fixed_string;
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_lc_null_types_test WHERE str = '1' SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM test.bloom_filter_lc_null_types_test WHERE fixed_string = toFixedString('1', 5) SETTINGS max_rows_to_read = 12;
|
||||
SELECT COUNT() FROM bloom_filter_lc_null_types_test WHERE str = '1' SETTINGS max_rows_to_read = 6;
|
||||
SELECT COUNT() FROM bloom_filter_lc_null_types_test WHERE fixed_string = toFixedString('1', 5) SETTINGS max_rows_to_read = 12;
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_lc_null_types_test WHERE isNull(str);
|
||||
SELECT COUNT() FROM test.bloom_filter_lc_null_types_test WHERE isNull(fixed_string);
|
||||
SELECT COUNT() FROM bloom_filter_lc_null_types_test WHERE isNull(str);
|
||||
SELECT COUNT() FROM bloom_filter_lc_null_types_test WHERE isNull(fixed_string);
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_lc_null_types_test WHERE str IN ( SELECT str FROM test.bloom_filter_lc_null_types_test);
|
||||
SELECT COUNT() FROM bloom_filter_lc_null_types_test WHERE str IN ( SELECT str FROM bloom_filter_lc_null_types_test);
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_lc_null_types_test;
|
||||
DROP TABLE IF EXISTS bloom_filter_lc_null_types_test;
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_array_lc_null_types_test;
|
||||
DROP TABLE IF EXISTS bloom_filter_array_lc_null_types_test;
|
||||
|
||||
CREATE TABLE test.bloom_filter_array_lc_null_types_test (order_key Array(LowCardinality(Nullable((UInt64)))), i8 Array(LowCardinality(Nullable((Int8)))), i16 Array(LowCardinality(Nullable((Int16)))), i32 Array(LowCardinality(Nullable((Int32)))), i64 Array(LowCardinality(Nullable((Int64)))), u8 Array(LowCardinality(Nullable((UInt8)))), u16 Array(LowCardinality(Nullable((UInt16)))), u32 Array(LowCardinality(Nullable((UInt32)))), u64 Array(LowCardinality(Nullable((UInt64)))), f32 Array(LowCardinality(Nullable((Float32)))), f64 Array(LowCardinality(Nullable((Float64)))), date Array(LowCardinality(Nullable((Date)))), date_time Array(LowCardinality(Nullable(DateTime('Europe/Moscow')))), str Array(LowCardinality(Nullable((String)))), fixed_string Array(LowCardinality(Nullable(FixedString(5)))), INDEX idx (i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, date, date_time, str, fixed_string) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 6;
|
||||
INSERT INTO test.bloom_filter_array_lc_null_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers LIMIT 15);
|
||||
INSERT INTO test.bloom_filter_array_lc_null_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers WHERE number >= 5 LIMIT 15);
|
||||
INSERT INTO test.bloom_filter_array_lc_null_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers WHERE number >= 10 LIMIT 15);
|
||||
INSERT INTO test.bloom_filter_array_lc_null_types_test SELECT n AS order_key, n AS i8, n AS i16, n AS i32, n AS i64, n AS u8, n AS u16, n AS u32, n AS u64, n AS f32, n AS f64, n AS date, n AS date_time, n AS str, n AS fixed_string FROM (SELECT [NULL] AS n);
|
||||
INSERT INTO test.bloom_filter_array_lc_null_types_test SELECT [NULL, n] AS order_key, [NULL, toInt8(n)] AS i8, [NULL, toInt16(n)] AS i16, [NULL, toInt32(n)] AS i32, [NULL, toInt64(n)] AS i64, [NULL, toUInt8(n)] AS u8, [NULL, toUInt16(n)] AS u16, [NULL, toUInt32(n)] AS u32, [NULL, toUInt64(n)] AS u64, [NULL, toFloat32(n)] AS f32, [NULL, toFloat64(n)] AS f64, [NULL, toDate(n, 'Europe/Moscow')] AS date, [NULL, toDateTime(n, 'Europe/Moscow')] AS date_time, [NULL, toString(n)] AS str, [NULL, toFixedString(toString(n), 5)] AS fixed_string FROM (SELECT 100 as n);
|
||||
CREATE TABLE bloom_filter_array_lc_null_types_test (order_key Array(LowCardinality(Nullable((UInt64)))), i8 Array(LowCardinality(Nullable((Int8)))), i16 Array(LowCardinality(Nullable((Int16)))), i32 Array(LowCardinality(Nullable((Int32)))), i64 Array(LowCardinality(Nullable((Int64)))), u8 Array(LowCardinality(Nullable((UInt8)))), u16 Array(LowCardinality(Nullable((UInt16)))), u32 Array(LowCardinality(Nullable((UInt32)))), u64 Array(LowCardinality(Nullable((UInt64)))), f32 Array(LowCardinality(Nullable((Float32)))), f64 Array(LowCardinality(Nullable((Float64)))), date Array(LowCardinality(Nullable((Date)))), date_time Array(LowCardinality(Nullable(DateTime('Europe/Moscow')))), str Array(LowCardinality(Nullable((String)))), fixed_string Array(LowCardinality(Nullable(FixedString(5)))), INDEX idx (i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, date, date_time, str, fixed_string) TYPE bloom_filter GRANULARITY 1) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 6;
|
||||
INSERT INTO bloom_filter_array_lc_null_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers LIMIT 15);
|
||||
INSERT INTO bloom_filter_array_lc_null_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers WHERE number >= 5 LIMIT 15);
|
||||
INSERT INTO bloom_filter_array_lc_null_types_test SELECT groupArray(number) AS order_key, groupArray(toInt8(number)) AS i8, groupArray(toInt16(number)) AS i16, groupArray(toInt32(number)) AS i32, groupArray(toInt64(number)) AS i64, groupArray(toUInt8(number)) AS u8, groupArray(toUInt16(number)) AS u16, groupArray(toUInt32(number)) AS u32, groupArray(toUInt64(number)) AS u64, groupArray(toFloat32(number)) AS f32, groupArray(toFloat64(number)) AS f64, groupArray(toDate(number, 'Europe/Moscow')) AS date, groupArray(toDateTime(number, 'Europe/Moscow')) AS date_time, groupArray(toString(number)) AS str, groupArray(toFixedString(toString(number), 5)) AS fixed_string FROM (SELECT number FROM system.numbers WHERE number >= 10 LIMIT 15);
|
||||
INSERT INTO bloom_filter_array_lc_null_types_test SELECT n AS order_key, n AS i8, n AS i16, n AS i32, n AS i64, n AS u8, n AS u16, n AS u32, n AS u64, n AS f32, n AS f64, n AS date, n AS date_time, n AS str, n AS fixed_string FROM (SELECT [NULL] AS n);
|
||||
INSERT INTO bloom_filter_array_lc_null_types_test SELECT [NULL, n] AS order_key, [NULL, toInt8(n)] AS i8, [NULL, toInt16(n)] AS i16, [NULL, toInt32(n)] AS i32, [NULL, toInt64(n)] AS i64, [NULL, toUInt8(n)] AS u8, [NULL, toUInt16(n)] AS u16, [NULL, toUInt32(n)] AS u32, [NULL, toUInt64(n)] AS u64, [NULL, toFloat32(n)] AS f32, [NULL, toFloat64(n)] AS f64, [NULL, toDate(n, 'Europe/Moscow')] AS date, [NULL, toDateTime(n, 'Europe/Moscow')] AS date_time, [NULL, toString(n)] AS str, [NULL, toFixedString(toString(n), 5)] AS fixed_string FROM (SELECT 100 as n);
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i8, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i16, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i32, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i64, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u8, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u16, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u32, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u64, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(f32, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(f64, 1);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(date, toDate('1970-01-02'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:01', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(str, '1');
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(fixed_string, toFixedString('1', 5));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i8, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i16, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i32, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i64, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u8, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u16, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u32, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u64, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(f32, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(f64, 1);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(date, toDate('1970-01-02'));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:01', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(str, '1');
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(fixed_string, toFixedString('1', 5));
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i8, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i16, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i32, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i64, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u8, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u16, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u32, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u64, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(f32, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(f64, 5);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(date, toDate('1970-01-06'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:05', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(str, '5');
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(fixed_string, toFixedString('5', 5));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i8, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i16, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i32, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i64, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u8, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u16, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u32, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u64, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(f32, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(f64, 5);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(date, toDate('1970-01-06'));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:05', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(str, '5');
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(fixed_string, toFixedString('5', 5));
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i8, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i16, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i32, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i64, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u8, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u16, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u32, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u64, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(f32, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(f64, 10);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(date, toDate('1970-01-11'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:10', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(str, '10');
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(fixed_string, toFixedString('10', 5));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i8, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i16, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i32, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i64, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u8, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u16, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u32, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u64, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(f32, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(f64, 10);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(date, toDate('1970-01-11'));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(date_time, toDateTime('1970-01-01 03:00:10', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(str, '10');
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(fixed_string, toFixedString('10', 5));
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i8, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i16, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i32, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i64, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u8, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u16, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u32, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u64, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(f32, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(f64, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(date, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(date_time, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(str, NULL);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(fixed_string, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i8, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i16, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i32, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i64, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u8, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u16, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u32, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u64, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(f32, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(f64, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(date, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(date_time, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(str, NULL);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(fixed_string, NULL);
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i8, 100);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i16, 100);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i32, 100);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(i64, 100);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u8, 100);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u16, 100);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u32, 100);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(u64, 100);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(f32, 100);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(f64, 100);
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(date, toDate('1970-04-11'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(date_time, toDateTime('1970-01-01 03:01:40', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(str, '100');
|
||||
SELECT COUNT() FROM test.bloom_filter_array_lc_null_types_test WHERE has(fixed_string, toFixedString('100', 5));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i8, 100);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i16, 100);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i32, 100);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(i64, 100);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u8, 100);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u16, 100);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u32, 100);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(u64, 100);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(f32, 100);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(f64, 100);
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(date, toDate('1970-04-11'));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(date_time, toDateTime('1970-01-01 03:01:40', 'Europe/Moscow'));
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(str, '100');
|
||||
SELECT COUNT() FROM bloom_filter_array_lc_null_types_test WHERE has(fixed_string, toFixedString('100', 5));
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_array_lc_null_types_test;
|
||||
DROP TABLE IF EXISTS bloom_filter_array_lc_null_types_test;
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_array_offsets_lc_str;
|
||||
CREATE TABLE test.bloom_filter_array_offsets_lc_str (order_key int, str Array(LowCardinality((String))), INDEX idx str TYPE bloom_filter(1.01) GRANULARITY 1024) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 1024;
|
||||
INSERT INTO test.bloom_filter_array_offsets_lc_str SELECT number AS i, if(i%2, ['value'], []) FROM system.numbers LIMIT 10000;
|
||||
SELECT count() FROM test.bloom_filter_array_offsets_lc_str WHERE has(str, 'value');
|
||||
DROP TABLE IF EXISTS test.bloom_filter_array_offsets_lc_str;
|
||||
DROP TABLE IF EXISTS bloom_filter_array_offsets_lc_str;
|
||||
CREATE TABLE bloom_filter_array_offsets_lc_str (order_key int, str Array(LowCardinality((String))), INDEX idx str TYPE bloom_filter(1.01) GRANULARITY 1024) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 1024;
|
||||
INSERT INTO bloom_filter_array_offsets_lc_str SELECT number AS i, if(i%2, ['value'], []) FROM system.numbers LIMIT 10000;
|
||||
SELECT count() FROM bloom_filter_array_offsets_lc_str WHERE has(str, 'value');
|
||||
DROP TABLE IF EXISTS bloom_filter_array_offsets_lc_str;
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_array_offsets_str;
|
||||
CREATE TABLE test.bloom_filter_array_offsets_str (order_key int, str Array(String), INDEX idx str TYPE bloom_filter(1.01) GRANULARITY 1024) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 1024;
|
||||
INSERT INTO test.bloom_filter_array_offsets_str SELECT number AS i, if(i%2, ['value'], []) FROM system.numbers LIMIT 10000;
|
||||
SELECT count() FROM test.bloom_filter_array_offsets_str WHERE has(str, 'value');
|
||||
DROP TABLE IF EXISTS test.bloom_filter_array_offsets_str;
|
||||
DROP TABLE IF EXISTS bloom_filter_array_offsets_str;
|
||||
CREATE TABLE bloom_filter_array_offsets_str (order_key int, str Array(String), INDEX idx str TYPE bloom_filter(1.01) GRANULARITY 1024) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 1024;
|
||||
INSERT INTO bloom_filter_array_offsets_str SELECT number AS i, if(i%2, ['value'], []) FROM system.numbers LIMIT 10000;
|
||||
SELECT count() FROM bloom_filter_array_offsets_str WHERE has(str, 'value');
|
||||
DROP TABLE IF EXISTS bloom_filter_array_offsets_str;
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_array_offsets_i;
|
||||
CREATE TABLE test.bloom_filter_array_offsets_i (order_key int, i Array(int), INDEX idx i TYPE bloom_filter(1.01) GRANULARITY 1024) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 1024;
|
||||
INSERT INTO test.bloom_filter_array_offsets_i SELECT number AS i, if(i%2, [99999], []) FROM system.numbers LIMIT 10000;
|
||||
SELECT count() FROM test.bloom_filter_array_offsets_i WHERE has(i, 99999);
|
||||
DROP TABLE IF EXISTS test.bloom_filter_array_offsets_i;
|
||||
DROP TABLE IF EXISTS bloom_filter_array_offsets_i;
|
||||
CREATE TABLE bloom_filter_array_offsets_i (order_key int, i Array(int), INDEX idx i TYPE bloom_filter(1.01) GRANULARITY 1024) ENGINE = MergeTree() ORDER BY order_key SETTINGS index_granularity = 1024;
|
||||
INSERT INTO bloom_filter_array_offsets_i SELECT number AS i, if(i%2, [99999], []) FROM system.numbers LIMIT 10000;
|
||||
SELECT count() FROM bloom_filter_array_offsets_i WHERE has(i, 99999);
|
||||
DROP TABLE IF EXISTS bloom_filter_array_offsets_i;
|
||||
|
@ -1,5 +1,3 @@
|
||||
USE test;
|
||||
|
||||
DROP TABLE IF EXISTS codecTest;
|
||||
|
||||
CREATE TABLE codecTest (
|
||||
|
@ -1,5 +1,3 @@
|
||||
USE test;
|
||||
|
||||
DROP TABLE IF EXISTS codecTest;
|
||||
|
||||
CREATE TABLE codecTest (
|
||||
|
@ -1,20 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE TEMPORARY LIVE VIEW test.lv AS SELECT sum(a) FROM test.mt;
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE TEMPORARY LIVE VIEW lv AS SELECT sum(a) FROM mt;
|
||||
|
||||
WATCH test.lv LIMIT 0;
|
||||
WATCH lv LIMIT 0;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
WATCH test.lv LIMIT 0;
|
||||
WATCH lv LIMIT 0;
|
||||
|
||||
INSERT INTO test.mt VALUES (4),(5),(6);
|
||||
INSERT INTO mt VALUES (4),(5),(6);
|
||||
|
||||
WATCH test.lv LIMIT 0;
|
||||
WATCH lv LIMIT 0;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -7,3 +7,6 @@ INSERT INTO tableFile_00968 SELECT number FROM system.numbers LIMIT 10;
|
||||
INSERT INTO tableMergeTree_00968 SELECT number FROM system.numbers LIMIT 100;
|
||||
|
||||
SELECT id FROM tableMergeTree_00968 WHERE id IN (SELECT number FROM tableFile_00968) ORDER BY id;
|
||||
|
||||
DROP TABLE tableFile_00968;
|
||||
DROP TABLE tableMergeTree_00968;
|
||||
|
@ -1,14 +1,14 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT * FROM test.mt;
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT * FROM mt;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT * FROM test.lv FORMAT JSONEachRowWithProgress;
|
||||
SELECT * FROM lv FORMAT JSONEachRowWithProgress;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,20 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT sum(a) FROM test.mt;
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT sum(a) FROM mt;
|
||||
|
||||
WATCH test.lv LIMIT 0 FORMAT JSONEachRowWithProgress;
|
||||
WATCH lv LIMIT 0 FORMAT JSONEachRowWithProgress;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
WATCH test.lv LIMIT 0 FORMAT JSONEachRowWithProgress;
|
||||
WATCH lv LIMIT 0 FORMAT JSONEachRowWithProgress;
|
||||
|
||||
INSERT INTO test.mt VALUES (4),(5),(6);
|
||||
INSERT INTO mt VALUES (4),(5),(6);
|
||||
|
||||
WATCH test.lv LIMIT 0 FORMAT JSONEachRowWithProgress;
|
||||
WATCH lv LIMIT 0 FORMAT JSONEachRowWithProgress;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,9 +1,9 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
|
||||
CREATE LIVE VIEW test.lv AS SELECT 1;
|
||||
CREATE LIVE VIEW lv AS SELECT 1;
|
||||
|
||||
SELECT * FROM test.lv;
|
||||
SELECT * FROM lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE lv;
|
||||
|
@ -1,20 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT sum(a) FROM test.mt;
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT sum(a) FROM mt;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,21 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT a FROM (SELECT a FROM test.mt);
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT a FROM (SELECT a FROM mt);
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,29 +1,28 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.A;
|
||||
DROP TABLE IF EXISTS test.B;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS A;
|
||||
DROP TABLE IF EXISTS B;
|
||||
|
||||
CREATE TABLE test.A (id Int32) Engine=Memory;
|
||||
CREATE TABLE test.B (id Int32, name String) Engine=Memory;
|
||||
CREATE TABLE A (id Int32) Engine=Memory;
|
||||
CREATE TABLE B (id Int32, name String) Engine=Memory;
|
||||
|
||||
CREATE LIVE VIEW test.lv AS SELECT id, name FROM ( SELECT A.id, B.name FROM test.A as A, test.B as B WHERE A.id = B.id );
|
||||
CREATE LIVE VIEW lv AS SELECT id, name FROM ( SELECT A.id, B.name FROM A as A, B as B WHERE A.id = B.id );
|
||||
|
||||
SELECT * FROM test.lv;
|
||||
SELECT * FROM lv;
|
||||
|
||||
INSERT INTO test.A VALUES (1);
|
||||
INSERT INTO test.B VALUES (1, 'hello');
|
||||
INSERT INTO A VALUES (1);
|
||||
INSERT INTO B VALUES (1, 'hello');
|
||||
|
||||
SELECT *,_version FROM test.lv ORDER BY id;
|
||||
SELECT *,_version FROM test.lv ORDER BY id;
|
||||
SELECT *,_version FROM lv ORDER BY id;
|
||||
SELECT *,_version FROM lv ORDER BY id;
|
||||
|
||||
INSERT INTO test.A VALUES (2)
|
||||
INSERT INTO test.B VALUES (2, 'hello')
|
||||
INSERT INTO A VALUES (2)
|
||||
INSERT INTO B VALUES (2, 'hello')
|
||||
|
||||
SELECT *,_version FROM test.lv ORDER BY id;
|
||||
SELECT *,_version FROM test.lv ORDER BY id;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.A;
|
||||
DROP TABLE test.B;
|
||||
SELECT *,_version FROM lv ORDER BY id;
|
||||
SELECT *,_version FROM lv ORDER BY id;
|
||||
|
||||
DROP TABLE lv;
|
||||
DROP TABLE A;
|
||||
DROP TABLE B;
|
||||
|
@ -1,29 +1,28 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.A;
|
||||
DROP TABLE IF EXISTS test.B;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS A;
|
||||
DROP TABLE IF EXISTS B;
|
||||
|
||||
CREATE TABLE test.A (id Int32) Engine=Memory;
|
||||
CREATE TABLE test.B (id Int32, name String) Engine=Memory;
|
||||
CREATE TABLE A (id Int32) Engine=Memory;
|
||||
CREATE TABLE B (id Int32, name String) Engine=Memory;
|
||||
|
||||
CREATE LIVE VIEW test.lv AS SELECT id, name FROM ( SELECT test.A.id, test.B.name FROM test.A, test.B WHERE test.A.id = test.B.id);
|
||||
CREATE LIVE VIEW lv AS SELECT id, name FROM ( SELECT A.id, B.name FROM A, B WHERE A.id = B.id);
|
||||
|
||||
SELECT * FROM test.lv;
|
||||
SELECT * FROM lv;
|
||||
|
||||
INSERT INTO test.A VALUES (1);
|
||||
INSERT INTO test.B VALUES (1, 'hello');
|
||||
INSERT INTO A VALUES (1);
|
||||
INSERT INTO B VALUES (1, 'hello');
|
||||
|
||||
SELECT *,_version FROM test.lv ORDER BY id;
|
||||
SELECT *,_version FROM test.lv ORDER BY id;
|
||||
SELECT *,_version FROM lv ORDER BY id;
|
||||
SELECT *,_version FROM lv ORDER BY id;
|
||||
|
||||
INSERT INTO test.A VALUES (2)
|
||||
INSERT INTO test.B VALUES (2, 'hello')
|
||||
INSERT INTO A VALUES (2)
|
||||
INSERT INTO B VALUES (2, 'hello')
|
||||
|
||||
SELECT *,_version FROM test.lv ORDER BY id;
|
||||
SELECT *,_version FROM test.lv ORDER BY id;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.A;
|
||||
DROP TABLE test.B;
|
||||
SELECT *,_version FROM lv ORDER BY id;
|
||||
SELECT *,_version FROM lv ORDER BY id;
|
||||
|
||||
DROP TABLE lv;
|
||||
DROP TABLE A;
|
||||
DROP TABLE B;
|
||||
|
@ -1,21 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT a FROM ( SELECT * FROM ( SELECT a FROM (SELECT a FROM test.mt) ) );
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT a FROM ( SELECT * FROM ( SELECT a FROM (SELECT a FROM mt) ) );
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,21 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT * FROM ( SELECT sum(a) FROM ( SELECT a FROM (SELECT a FROM test.mt) ) );
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT * FROM ( SELECT sum(a) FROM ( SELECT a FROM (SELECT a FROM mt) ) );
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,21 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT * FROM ( SELECT sum(boo.x) FROM ( SELECT foo.x FROM (SELECT a AS x FROM test.mt) AS foo) AS boo );
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT * FROM ( SELECT sum(boo.x) FROM ( SELECT foo.x FROM (SELECT a AS x FROM mt) AS foo) AS boo );
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,21 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT foo.x FROM (SELECT a AS x FROM test.mt) AS foo;
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT foo.x FROM (SELECT a AS x FROM mt) AS foo;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,21 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT sum(a) FROM (SELECT a FROM test.mt);
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT sum(a) FROM (SELECT a FROM mt);
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,21 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT * FROM (SELECT sum(a) FROM test.mt);
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT * FROM (SELECT sum(a) FROM mt);
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM test.lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
SELECT *,_version FROM lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,18 +1,18 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT * FROM test.mt;
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT * FROM mt;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT sum(a) FROM test.lv;
|
||||
SELECT sum(a) FROM lv;
|
||||
|
||||
INSERT INTO test.mt VALUES (4),(5),(6);
|
||||
INSERT INTO mt VALUES (4),(5),(6);
|
||||
|
||||
SELECT sum(a) FROM test.lv;
|
||||
SELECT sum(a) FROM lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,9 +1,9 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT * FROM test.mt;
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT * FROM mt;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,9 +1,7 @@
|
||||
DROP TABLE IF EXISTS test.src;
|
||||
DROP TABLE IF EXISTS test.dst1;
|
||||
DROP TABLE IF EXISTS test.src_to_dst1;
|
||||
DROP TABLE IF EXISTS test.dst2;
|
||||
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS src;
|
||||
DROP TABLE IF EXISTS dst1;
|
||||
DROP TABLE IF EXISTS src_to_dst1;
|
||||
DROP TABLE IF EXISTS dst2;
|
||||
|
||||
CREATE TABLE src (x UInt8) ENGINE Memory;
|
||||
CREATE TABLE dst1 (x UInt8) ENGINE Memory;
|
||||
|
@ -5,3 +5,5 @@ insert into sample_prewhere values ('2019-01-01', 1, toDateTime('2019-07-20 00:0
|
||||
insert into sample_prewhere values ('2019-01-02', 3, toDateTime('2019-07-20 00:00:03'));
|
||||
|
||||
select id from remote('127.0.0.{1,3}', currentDatabase(), sample_prewhere) SAMPLE 1 where toDateTime(time) = '2019-07-20 00:00:00';
|
||||
|
||||
drop table sample_prewhere;
|
||||
|
@ -1,14 +1,14 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT * FROM test.mt;
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT * FROM mt;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
SELECT *,_version FROM test.lv;
|
||||
SELECT *,_version FROM lv;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,20 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT sum(a) FROM test.mt;
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT sum(a) FROM mt;
|
||||
|
||||
WATCH test.lv EVENTS LIMIT 0;
|
||||
WATCH lv EVENTS LIMIT 0;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
WATCH test.lv EVENTS LIMIT 0;
|
||||
WATCH lv EVENTS LIMIT 0;
|
||||
|
||||
INSERT INTO test.mt VALUES (4),(5),(6);
|
||||
INSERT INTO mt VALUES (4),(5),(6);
|
||||
|
||||
WATCH test.lv EVENTS LIMIT 0;
|
||||
WATCH lv EVENTS LIMIT 0;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,20 +1,20 @@
|
||||
SET allow_experimental_live_view = 1;
|
||||
|
||||
DROP TABLE IF EXISTS test.lv;
|
||||
DROP TABLE IF EXISTS test.mt;
|
||||
DROP TABLE IF EXISTS lv;
|
||||
DROP TABLE IF EXISTS mt;
|
||||
|
||||
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW test.lv AS SELECT sum(a) FROM test.mt;
|
||||
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
|
||||
CREATE LIVE VIEW lv AS SELECT sum(a) FROM mt;
|
||||
|
||||
WATCH test.lv LIMIT 0;
|
||||
WATCH lv LIMIT 0;
|
||||
|
||||
INSERT INTO test.mt VALUES (1),(2),(3);
|
||||
INSERT INTO mt VALUES (1),(2),(3);
|
||||
|
||||
WATCH test.lv LIMIT 0;
|
||||
WATCH lv LIMIT 0;
|
||||
|
||||
INSERT INTO test.mt VALUES (4),(5),(6);
|
||||
INSERT INTO mt VALUES (4),(5),(6);
|
||||
|
||||
WATCH test.lv LIMIT 0;
|
||||
WATCH lv LIMIT 0;
|
||||
|
||||
DROP TABLE test.lv;
|
||||
DROP TABLE test.mt;
|
||||
DROP TABLE lv;
|
||||
DROP TABLE mt;
|
||||
|
@ -1,15 +1,15 @@
|
||||
|
||||
DROP TABLE IF EXISTS test.set_index_not;
|
||||
DROP TABLE IF EXISTS set_index_not;
|
||||
|
||||
CREATE TABLE test.set_index_not
|
||||
CREATE TABLE set_index_not
|
||||
( name String, status Enum8('alive' = 0, 'rip' = 1),
|
||||
INDEX idx_status status TYPE set(2) GRANULARITY 1
|
||||
)
|
||||
ENGINE = MergeTree() ORDER BY name SETTINGS index_granularity = 8192;
|
||||
|
||||
insert into test.set_index_not values ('Jon','alive'),('Ramsey','rip');
|
||||
insert into set_index_not values ('Jon','alive'),('Ramsey','rip');
|
||||
|
||||
select * from test.set_index_not where status!='rip';
|
||||
select * from test.set_index_not where NOT (status ='rip');
|
||||
select * from set_index_not where status!='rip';
|
||||
select * from set_index_not where NOT (status ='rip');
|
||||
|
||||
DROP TABLE test.set_index_not;
|
||||
DROP TABLE set_index_not;
|
||||
|
@ -4,3 +4,5 @@ CREATE TABLE order_with_aggr(a Int) ENGINE = MergeTree ORDER BY a;
|
||||
|
||||
INSERT INTO order_with_aggr SELECT * FROM numbers(100);
|
||||
SELECT sum(a) as s FROM order_with_aggr ORDER BY s;
|
||||
|
||||
DROP TABLE order_with_aggr;
|
||||
|
@ -1,7 +1,6 @@
|
||||
DROP TABLE IF EXISTS set_array;
|
||||
|
||||
DROP TABLE IF EXISTS test.set_array;
|
||||
|
||||
CREATE TABLE test.set_array
|
||||
CREATE TABLE set_array
|
||||
(
|
||||
primary_key String,
|
||||
index_array Array(UInt64),
|
||||
@ -9,7 +8,7 @@ CREATE TABLE test.set_array
|
||||
) ENGINE = MergeTree()
|
||||
ORDER BY (primary_key);
|
||||
|
||||
INSERT INTO test.set_array
|
||||
INSERT INTO set_array
|
||||
select
|
||||
toString(intDiv(number, 1000000)) as primary_key,
|
||||
array(number) as index_array
|
||||
@ -18,6 +17,6 @@ limit 10000000;
|
||||
|
||||
SET max_rows_to_read = 8192;
|
||||
|
||||
select count() from test.set_array where has(index_array, 333);
|
||||
select count() from set_array where has(index_array, 333);
|
||||
|
||||
DROP TABLE test.set_array;
|
||||
DROP TABLE set_array;
|
||||
|
@ -3,3 +3,5 @@ create table tab (x UInt64) engine = MergeTree order by tuple();
|
||||
|
||||
insert into tab select number as n from numbers(20) semi left join (select number * 10 as n from numbers(2)) using(n) settings max_block_size = 5;
|
||||
select * from tab order by x;
|
||||
|
||||
drop table tab;
|
||||
|
@ -2,3 +2,7 @@ CREATE TABLE foo (key int, INDEX i1 key TYPE minmax GRANULARITY 1) Engine=MergeT
|
||||
CREATE TABLE as_foo AS foo;
|
||||
CREATE TABLE dist (key int, INDEX i1 key TYPE minmax GRANULARITY 1) Engine=Distributed(test_shard_localhost, currentDatabase(), 'foo'); -- { serverError 36 }
|
||||
CREATE TABLE dist_as_foo Engine=Distributed(test_shard_localhost, currentDatabase(), 'foo') AS foo;
|
||||
|
||||
DROP TABLE foo;
|
||||
DROP TABLE as_foo;
|
||||
DROP TABLE dist_as_foo;
|
||||
|
@ -161,3 +161,4 @@ DROP DATABASE IF EXISTS ordinary_db;
|
||||
DROP TABLE IF EXISTS database_for_dict.table_for_dict;
|
||||
|
||||
DROP DATABASE IF EXISTS database_for_dict;
|
||||
DROP DATABASE IF EXISTS memory_db;
|
||||
|
@ -35,3 +35,6 @@ SET min_insert_block_size_rows=100e3;
|
||||
INSERT INTO buffer_ SELECT toUInt64(number) FROM system.numbers LIMIT toUInt64(10e6+1);
|
||||
-- Check that 10e6 rows had been flushed from the query, not from the background worker.
|
||||
SELECT count() FROM buffer_;
|
||||
|
||||
DROP TABLE null_;
|
||||
DROP TABLE buffer_;
|
||||
|
@ -20,3 +20,5 @@ DETACH TABLE test;
|
||||
ATTACH TABLE test;
|
||||
|
||||
SELECT COUNT() FROM test;
|
||||
|
||||
DROP TABLE test;
|
||||
|
@ -19,3 +19,4 @@ SELECT * FROM userid_test WHERE toUInt64(1) IN (userid_set);
|
||||
SELECT * FROM userid_test WHERE userid IN (userid_set);
|
||||
|
||||
DROP TABLE userid_test;
|
||||
DROP TABLE userid_set;
|
||||
|
@ -1,18 +1,18 @@
|
||||
SET allow_experimental_data_skipping_indices = 1;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_null_array;
|
||||
DROP TABLE IF EXISTS bloom_filter_null_array;
|
||||
|
||||
CREATE TABLE test.bloom_filter_null_array (v Array(LowCardinality(Nullable(String))), INDEX idx v TYPE bloom_filter(0.1) GRANULARITY 1) ENGINE = MergeTree() ORDER BY v;
|
||||
CREATE TABLE bloom_filter_null_array (v Array(LowCardinality(Nullable(String))), INDEX idx v TYPE bloom_filter(0.1) GRANULARITY 1) ENGINE = MergeTree() ORDER BY v;
|
||||
|
||||
INSERT INTO test.bloom_filter_null_array VALUES ([]);
|
||||
INSERT INTO test.bloom_filter_null_array VALUES (['1', '2']) ([]) ([]);
|
||||
INSERT INTO test.bloom_filter_null_array VALUES ([]) ([]) (['2', '3']);
|
||||
INSERT INTO bloom_filter_null_array VALUES ([]);
|
||||
INSERT INTO bloom_filter_null_array VALUES (['1', '2']) ([]) ([]);
|
||||
INSERT INTO bloom_filter_null_array VALUES ([]) ([]) (['2', '3']);
|
||||
|
||||
SELECT COUNT() FROM test.bloom_filter_null_array;
|
||||
SELECT COUNT() FROM test.bloom_filter_null_array WHERE has(v, '1');
|
||||
SELECT COUNT() FROM test.bloom_filter_null_array WHERE has(v, '2');
|
||||
SELECT COUNT() FROM test.bloom_filter_null_array WHERE has(v, '3');
|
||||
SELECT COUNT() FROM test.bloom_filter_null_array WHERE has(v, '4');
|
||||
SELECT COUNT() FROM bloom_filter_null_array;
|
||||
SELECT COUNT() FROM bloom_filter_null_array WHERE has(v, '1');
|
||||
SELECT COUNT() FROM bloom_filter_null_array WHERE has(v, '2');
|
||||
SELECT COUNT() FROM bloom_filter_null_array WHERE has(v, '3');
|
||||
SELECT COUNT() FROM bloom_filter_null_array WHERE has(v, '4');
|
||||
|
||||
DROP TABLE IF EXISTS test.bloom_filter_null_array;
|
||||
DROP TABLE IF EXISTS bloom_filter_null_array;
|
||||
|
@ -11,3 +11,5 @@ ALTER TABLE column_size_bug DELETE WHERE value=1;
|
||||
SELECT sleep(1);
|
||||
|
||||
OPTIMIZE TABLE column_size_bug;
|
||||
|
||||
DROP TABLE column_size_bug;
|
||||
|
@ -123,5 +123,6 @@ DROP TABLE IF EXISTS logins;
|
||||
DROP TABLE IF EXISTS mv_logins2target;
|
||||
DROP TABLE IF EXISTS checkouts;
|
||||
DROP TABLE IF EXISTS mv_checkouts2target;
|
||||
DROP TABLE target_table;
|
||||
|
||||
SYSTEM START MERGES;
|
@ -14,3 +14,7 @@ INSERT INTO mv_source VALUES (1),(2),(3);
|
||||
|
||||
SELECT * FROM mv ORDER BY a;
|
||||
SELECT * FROM mv_target ORDER BY a;
|
||||
|
||||
DROP TABLE mv;
|
||||
DROP TABLE mv_source;
|
||||
DROP TABLE mv_target;
|
||||
|
@ -14,3 +14,7 @@ INSERT INTO mv_source VALUES (1),(2),(3);
|
||||
|
||||
SELECT * FROM mv ORDER BY a;
|
||||
SELECT * FROM mv_target ORDER BY a;
|
||||
|
||||
DROP TABLE mv;
|
||||
DROP TABLE mv_source;
|
||||
DROP TABLE mv_target;
|
||||
|
@ -4,3 +4,4 @@ ATTACH TABLE IF NOT EXISTS t;
|
||||
DETACH TABLE t;
|
||||
ATTACH TABLE IF NOT EXISTS t;
|
||||
EXISTS TABLE t;
|
||||
DROP TABLE t;
|
||||
|
@ -8,3 +8,5 @@ insert into t50 select number, multiIf(number < 5, 1, number < 50, 0, number < 5
|
||||
optimize table t50 final;
|
||||
|
||||
select a, b from t50 prewhere b = 1 order by a;
|
||||
|
||||
drop table t50;
|
||||
|
Loading…
Reference in New Issue
Block a user