11-- GCD codec can't be used stand-alone
2- CREATE TEMPORARY TABLE table_gcd_codec (n UInt64 CODEC(GCD)) ENGINE = Memory; -- { serverError BAD_ARGUMENTS }
2+ CREATE TABLE table_gcd_codec (n UInt64 CODEC(GCD)) ENGINE = Memory; -- { serverError BAD_ARGUMENTS }
33
44-- GCD codec rejects non-integer/decimal/datetime types
5- CREATE TEMPORARY TABLE table_gcd_codec (str String CODEC(GCD, LZ4)) ENGINE = Memory; -- { serverError BAD_ARGUMENTS }
5+ CREATE TABLE table_gcd_codec (str String CODEC(GCD, LZ4)) ENGINE = Memory; -- { serverError BAD_ARGUMENTS }
66
77-- Basic random-based correctness test
8- CREATE TEMPORARY TABLE table_lz4 (id UInt64, ui UInt256 CODEC(LZ4)) ENGINE = Memory;
8+ CREATE TABLE table_lz4 (id UInt64, ui UInt256 CODEC(LZ4)) ENGINE = Memory;
99INSERT INTO table_lz4 SELECT * FROM generateRandom() LIMIT 50 ;
1010
11- CREATE TEMPORARY TABLE table_gcd (id UInt64, ui UInt256 CODEC(GCD, LZ4)) ENGINE = Memory;
11+ CREATE TABLE table_gcd (id UInt64, ui UInt256 CODEC(GCD, LZ4)) ENGINE = Memory;
1212INSERT INTO table_gcd SELECT * FROM table_lz4;
1313
1414SELECT COUNT (* )
@@ -23,12 +23,12 @@ WHERE ui1 != ui2;
2323-- Compression/decompression works for all data types supported by GCD codec
2424
2525-- Int*
26- CREATE TEMPORARY TABLE table_gcd_codec_uint8 (n UInt8 CODEC(GCD, LZ4)) ENGINE = Memory;
27- CREATE TEMPORARY TABLE table_gcd_codec_uint16 (n UInt16 CODEC(GCD, LZ4)) ENGINE = Memory;
28- CREATE TEMPORARY TABLE table_gcd_codec_uint32 (n UInt32 CODEC(GCD, LZ4)) ENGINE = Memory;
29- CREATE TEMPORARY TABLE table_gcd_codec_uint64 (n UInt64 CODEC(GCD, LZ4)) ENGINE = Memory;
30- CREATE TEMPORARY TABLE table_gcd_codec_uint128 (n UInt128 CODEC(GCD, LZ4)) ENGINE = Memory;
31- CREATE TEMPORARY TABLE table_gcd_codec_uint256 (n UInt256 CODEC(GCD, LZ4)) ENGINE = Memory;
26+ CREATE TABLE table_gcd_codec_uint8 (n UInt8 CODEC(GCD, LZ4)) ENGINE = Memory;
27+ CREATE TABLE table_gcd_codec_uint16 (n UInt16 CODEC(GCD, LZ4)) ENGINE = Memory;
28+ CREATE TABLE table_gcd_codec_uint32 (n UInt32 CODEC(GCD, LZ4)) ENGINE = Memory;
29+ CREATE TABLE table_gcd_codec_uint64 (n UInt64 CODEC(GCD, LZ4)) ENGINE = Memory;
30+ CREATE TABLE table_gcd_codec_uint128 (n UInt128 CODEC(GCD, LZ4)) ENGINE = Memory;
31+ CREATE TABLE table_gcd_codec_uint256 (n UInt256 CODEC(GCD, LZ4)) ENGINE = Memory;
3232
3333INSERT INTO table_gcd_codec_uint8 SELECT number FROM system .numbers LIMIT 50 ;
3434INSERT INTO table_gcd_codec_uint16 SELECT number FROM system .numbers LIMIT 50 ;
@@ -45,12 +45,12 @@ SELECT * FROM table_gcd_codec_uint128;
4545SELECT * FROM table_gcd_codec_uint256;
4646
4747-- UInt*
48- CREATE TEMPORARY TABLE table_gcd_codec_int8 (n Int8 CODEC(GCD, LZ4)) ENGINE = Memory;
49- CREATE TEMPORARY TABLE table_gcd_codec_int16 (n Int16 CODEC(GCD, LZ4)) ENGINE = Memory;
50- CREATE TEMPORARY TABLE table_gcd_codec_int32 (n Int32 CODEC(GCD, LZ4)) ENGINE = Memory;
51- CREATE TEMPORARY TABLE table_gcd_codec_int64 (n Int64 CODEC(GCD, LZ4)) ENGINE = Memory;
52- CREATE TEMPORARY TABLE table_gcd_codec_int128 (n Int128 CODEC(GCD, LZ4)) ENGINE = Memory;
53- CREATE TEMPORARY TABLE table_gcd_codec_int256 (n Int256 CODEC(GCD, LZ4)) ENGINE = Memory;
48+ CREATE TABLE table_gcd_codec_int8 (n Int8 CODEC(GCD, LZ4)) ENGINE = Memory;
49+ CREATE TABLE table_gcd_codec_int16 (n Int16 CODEC(GCD, LZ4)) ENGINE = Memory;
50+ CREATE TABLE table_gcd_codec_int32 (n Int32 CODEC(GCD, LZ4)) ENGINE = Memory;
51+ CREATE TABLE table_gcd_codec_int64 (n Int64 CODEC(GCD, LZ4)) ENGINE = Memory;
52+ CREATE TABLE table_gcd_codec_int128 (n Int128 CODEC(GCD, LZ4)) ENGINE = Memory;
53+ CREATE TABLE table_gcd_codec_int256 (n Int256 CODEC(GCD, LZ4)) ENGINE = Memory;
5454
5555INSERT INTO table_gcd_codec_int8 SELECT number FROM system .numbers LIMIT 50 ;
5656INSERT INTO table_gcd_codec_int16 SELECT number FROM system .numbers LIMIT 50 ;
@@ -67,10 +67,10 @@ SELECT * FROM table_gcd_codec_int128;
6767SELECT * FROM table_gcd_codec_int256;
6868
6969-- Decimal*
70- CREATE TEMPORARY TABLE table_gcd_codec_decimal32 (n Decimal32(1 ) CODEC(GCD, LZ4)) ENGINE = Memory;
71- CREATE TEMPORARY TABLE table_gcd_codec_decimal64 (n Decimal64(1 ) CODEC(GCD, LZ4)) ENGINE = Memory;
72- CREATE TEMPORARY TABLE table_gcd_codec_decimal128 (n Decimal128(1 ) CODEC(GCD, LZ4)) ENGINE = Memory;
73- CREATE TEMPORARY TABLE table_gcd_codec_decimal256 (n Decimal256(1 ) CODEC(GCD, LZ4)) ENGINE = Memory;
70+ CREATE TABLE table_gcd_codec_decimal32 (n Decimal32(1 ) CODEC(GCD, LZ4)) ENGINE = Memory;
71+ CREATE TABLE table_gcd_codec_decimal64 (n Decimal64(1 ) CODEC(GCD, LZ4)) ENGINE = Memory;
72+ CREATE TABLE table_gcd_codec_decimal128 (n Decimal128(1 ) CODEC(GCD, LZ4)) ENGINE = Memory;
73+ CREATE TABLE table_gcd_codec_decimal256 (n Decimal256(1 ) CODEC(GCD, LZ4)) ENGINE = Memory;
7474
7575INSERT INTO table_gcd_codec_decimal32 SELECT number FROM system .numbers LIMIT 50 ;
7676INSERT INTO table_gcd_codec_decimal64 SELECT number FROM system .numbers LIMIT 50 ;
@@ -83,8 +83,8 @@ SELECT * FROM table_gcd_codec_decimal128;
8383SELECT * FROM table_gcd_codec_decimal256;
8484
8585-- Date[32]
86- CREATE TEMPORARY TABLE table_gcd_codec_date (n Date CODEC(GCD, LZ4)) ENGINE = Memory;
87- CREATE TEMPORARY TABLE table_gcd_codec_date32 (n Date32 CODEC(GCD, LZ4)) ENGINE = Memory;
86+ CREATE TABLE table_gcd_codec_date (n Date CODEC(GCD, LZ4)) ENGINE = Memory;
87+ CREATE TABLE table_gcd_codec_date32 (n Date32 CODEC(GCD, LZ4)) ENGINE = Memory;
8888
8989INSERT INTO table_gcd_codec_date SELECT number FROM system .numbers LIMIT 50 ;
9090INSERT INTO table_gcd_codec_date32 SELECT number FROM system .numbers LIMIT 50 ;
@@ -93,8 +93,8 @@ SELECT * FROM table_gcd_codec_date;
9393SELECT * FROM table_gcd_codec_date32;
9494
9595-- DateTimeTime[64]
96- CREATE TEMPORARY TABLE table_gcd_codec_datetime (n DateTime(' Asia/Istanbul' ) CODEC(GCD, LZ4)) ENGINE = Memory;
97- CREATE TEMPORARY TABLE table_gcd_codec_datetime64 (n DateTime64(3 , ' Asia/Istanbul' ) CODEC(GCD, LZ4)) ENGINE = Memory;
96+ CREATE TABLE table_gcd_codec_datetime (n DateTime(' Asia/Istanbul' ) CODEC(GCD, LZ4)) ENGINE = Memory;
97+ CREATE TABLE table_gcd_codec_datetime64 (n DateTime64(3 , ' Asia/Istanbul' ) CODEC(GCD, LZ4)) ENGINE = Memory;
9898
9999INSERT INTO table_gcd_codec_datetime SELECT number FROM system .numbers LIMIT 50 ;
100100INSERT INTO table_gcd_codec_datetime64 SELECT number FROM system .numbers LIMIT 50 ;
@@ -105,7 +105,7 @@ SELECT * FROM table_gcd_codec_datetime64;
105105
106106-- A column with all zero values can be compressed/decompressed
107107
108- CREATE TEMPORARY TABLE table_gcd_codec_only_zeros (n UInt8 CODEC(GCD, LZ4)) ENGINE = Memory;
108+ CREATE TABLE table_gcd_codec_only_zeros (n UInt8 CODEC(GCD, LZ4)) ENGINE = Memory;
109109INSERT INTO table_gcd_codec_only_zeros VALUES (0 ), (0 ), (0 );
110110SELECT * FROM table_gcd_codec_only_zeros;
111111
0 commit comments