mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
23 lines
696 B
SQL
23 lines
696 B
SQL
DROP TABLE IF EXISTS file;
|
|
CREATE TABLE file (x UInt64) ENGINE = File(TSV, 'data1.tsv.br');
|
|
TRUNCATE TABLE file;
|
|
|
|
INSERT INTO file SELECT * FROM numbers(1000000);
|
|
SELECT count(), max(x) FROM file;
|
|
|
|
DROP TABLE file;
|
|
|
|
CREATE TABLE file (x UInt64) ENGINE = File(TSV, 'data2.tsv.gz');
|
|
TRUNCATE TABLE file;
|
|
|
|
INSERT INTO file SELECT * FROM numbers(1000000);
|
|
SELECT count(), max(x) FROM file;
|
|
|
|
DROP TABLE file;
|
|
|
|
SELECT count(), max(x) FROM file('data{1,2}.tsv.{gz,br}', TSV, 'x UInt64');
|
|
|
|
-- check that they are compressed
|
|
SELECT count() < 1000000, max(x) FROM file('data1.tsv.br', RowBinary, 'x UInt8', 'none');
|
|
SELECT count() < 3000000, max(x) FROM file('data2.tsv.gz', RowBinary, 'x UInt8', 'none');
|