mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #35229 from ClickHouse/change-timezone-in-stateful-tests
Change timezone in stateful tests.
This commit is contained in:
commit
f1b812bdc1
@ -1 +1 @@
|
||||
SELECT EventTime::DateTime('Europe/Moscow') FROM test.hits ORDER BY EventTime DESC LIMIT 10
|
||||
SELECT EventTime::DateTime('Asia/Dubai') FROM test.hits ORDER BY EventTime DESC LIMIT 10
|
||||
|
@ -1,3 +1,3 @@
|
||||
-- Tags: distributed
|
||||
|
||||
SELECT EventTime::DateTime('Europe/Moscow') FROM remote('127.0.0.{1,2}', test, hits) ORDER BY EventTime DESC LIMIT 10
|
||||
SELECT EventTime::DateTime('Asia/Dubai') FROM remote('127.0.0.{1,2}', test, hits) ORDER BY EventTime DESC LIMIT 10
|
||||
|
@ -1,4 +1,4 @@
|
||||
-- Tags: replica, distributed
|
||||
|
||||
SET max_parallel_replicas = 2;
|
||||
SELECT EventTime::DateTime('Europe/Moscow') FROM remote('127.0.0.{1|2}', test, hits) ORDER BY EventTime DESC LIMIT 10
|
||||
SELECT EventTime::DateTime('Asia/Dubai') FROM remote('127.0.0.{1|2}', test, hits) ORDER BY EventTime DESC LIMIT 10
|
||||
|
@ -1,6 +1,6 @@
|
||||
DROP TABLE IF EXISTS test.hits_snippet;
|
||||
|
||||
CREATE TABLE test.hits_snippet(EventTime DateTime('Europe/Moscow'), EventDate Date, CounterID UInt32, UserID UInt64, URL String, Referer String) ENGINE = MergeTree(EventDate, intHash32(UserID), (CounterID, EventDate, intHash32(UserID), EventTime), 8192);
|
||||
CREATE TABLE test.hits_snippet(EventTime DateTime('Asia/Dubai'), EventDate Date, CounterID UInt32, UserID UInt64, URL String, Referer String) ENGINE = MergeTree(EventDate, intHash32(UserID), (CounterID, EventDate, intHash32(UserID), EventTime), 8192);
|
||||
|
||||
SET min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0;
|
||||
SET max_block_size = 4096;
|
||||
|
@ -15,7 +15,7 @@ SELECT count() FROM test.hits WHERE EventDate IN (toDate('2014-03-18'), toDate('
|
||||
SELECT count() FROM test.hits WHERE EventDate = concat('2014-0', '3-18');
|
||||
|
||||
DROP TABLE IF EXISTS test.hits_indexed_by_time;
|
||||
CREATE TABLE test.hits_indexed_by_time (EventDate Date, EventTime DateTime('Europe/Moscow')) ENGINE = MergeTree ORDER BY (EventDate, EventTime);
|
||||
CREATE TABLE test.hits_indexed_by_time (EventDate Date, EventTime DateTime('Asia/Dubai')) ENGINE = MergeTree ORDER BY (EventDate, EventTime);
|
||||
INSERT INTO test.hits_indexed_by_time SELECT EventDate, EventTime FROM test.hits;
|
||||
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime = '2014-03-18 01:02:03';
|
||||
@ -25,12 +25,12 @@ SELECT count() FROM test.hits_indexed_by_time WHERE EventTime <= '2014-03-18 01:
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime >= '2014-03-18 01:02:03';
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime IN ('2014-03-18 01:02:03', '2014-03-19 04:05:06');
|
||||
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime = toDateTime('2014-03-18 01:02:03', 'Europe/Moscow');
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime < toDateTime('2014-03-18 01:02:03', 'Europe/Moscow');
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime > toDateTime('2014-03-18 01:02:03', 'Europe/Moscow');
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime <= toDateTime('2014-03-18 01:02:03', 'Europe/Moscow');
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime >= toDateTime('2014-03-18 01:02:03', 'Europe/Moscow');
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime IN (toDateTime('2014-03-18 01:02:03', 'Europe/Moscow'), toDateTime('2014-03-19 04:05:06', 'Europe/Moscow'));
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime = toDateTime('2014-03-18 01:02:03', 'Asia/Dubai');
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime < toDateTime('2014-03-18 01:02:03', 'Asia/Dubai');
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime > toDateTime('2014-03-18 01:02:03', 'Asia/Dubai');
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime <= toDateTime('2014-03-18 01:02:03', 'Asia/Dubai');
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime >= toDateTime('2014-03-18 01:02:03', 'Asia/Dubai');
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime IN (toDateTime('2014-03-18 01:02:03', 'Asia/Dubai'), toDateTime('2014-03-19 04:05:06', 'Asia/Dubai'));
|
||||
|
||||
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime = concat('2014-03-18 ', '01:02:03');
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SELECT UserID, EventTime::DateTime('Europe/Moscow'), pp.Key1, pp.Key2, ParsedParams.Key1 FROM test.hits ARRAY JOIN ParsedParams AS pp WHERE CounterID = 1704509 ORDER BY UserID, EventTime, pp.Key1, pp.Key2 LIMIT 100;
|
||||
SELECT UserID, EventTime::DateTime('Europe/Moscow'), pp.Key1, pp.Key2, ParsedParams.Key1 FROM test.hits LEFT ARRAY JOIN ParsedParams AS pp WHERE CounterID = 1704509 ORDER BY UserID, EventTime, pp.Key1, pp.Key2 LIMIT 100;
|
||||
SELECT UserID, EventTime::DateTime('Asia/Dubai'), pp.Key1, pp.Key2, ParsedParams.Key1 FROM test.hits ARRAY JOIN ParsedParams AS pp WHERE CounterID = 1704509 ORDER BY UserID, EventTime, pp.Key1, pp.Key2 LIMIT 100;
|
||||
SELECT UserID, EventTime::DateTime('Asia/Dubai'), pp.Key1, pp.Key2, ParsedParams.Key1 FROM test.hits LEFT ARRAY JOIN ParsedParams AS pp WHERE CounterID = 1704509 ORDER BY UserID, EventTime, pp.Key1, pp.Key2 LIMIT 100;
|
||||
|
@ -2,12 +2,12 @@ SET max_bytes_to_read = 600000000;
|
||||
|
||||
SET optimize_move_to_prewhere = 1;
|
||||
|
||||
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Europe/Moscow') >= '2014-03-20 00:00:00' AND toTimeZone(EventTime, 'Europe/Moscow') < '2014-03-21 00:00:00';
|
||||
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Europe/Moscow') >= '2014-03-20 00:00:00' AND URL != '' AND toTimeZone(EventTime, 'Europe/Moscow') < '2014-03-21 00:00:00';
|
||||
SELECT uniq(*) FROM test.hits WHERE toTimeZone(EventTime, 'Europe/Moscow') >= '2014-03-20 00:00:00' AND toTimeZone(EventTime, 'Europe/Moscow') < '2014-03-21 00:00:00' AND EventDate = '2014-03-21';
|
||||
WITH toTimeZone(EventTime, 'Europe/Moscow') AS xyz SELECT uniq(*) FROM test.hits WHERE xyz >= '2014-03-20 00:00:00' AND xyz < '2014-03-21 00:00:00' AND EventDate = '2014-03-21';
|
||||
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00';
|
||||
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND URL != '' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00';
|
||||
SELECT uniq(*) FROM test.hits WHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00' AND EventDate = '2014-03-21';
|
||||
WITH toTimeZone(EventTime, 'Asia/Dubai') AS xyz SELECT uniq(*) FROM test.hits WHERE xyz >= '2014-03-20 00:00:00' AND xyz < '2014-03-21 00:00:00' AND EventDate = '2014-03-21';
|
||||
|
||||
SET optimize_move_to_prewhere = 0;
|
||||
|
||||
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Europe/Moscow') >= '2014-03-20 00:00:00' AND toTimeZone(EventTime, 'Europe/Moscow') < '2014-03-21 00:00:00'; -- { serverError 307 }
|
||||
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Europe/Moscow') >= '2014-03-20 00:00:00' AND URL != '' AND toTimeZone(EventTime, 'Europe/Moscow') < '2014-03-21 00:00:00'; -- { serverError 307 }
|
||||
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00'; -- { serverError 307 }
|
||||
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND URL != '' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00'; -- { serverError 307 }
|
||||
|
@ -1,8 +1,8 @@
|
||||
CSV, false
|
||||
ea1c740f03f5dcc43a3044528ad0a98f -
|
||||
6929aaeac016d22c20464e3be38c64cd -
|
||||
CSV, true
|
||||
ea1c740f03f5dcc43a3044528ad0a98f -
|
||||
6929aaeac016d22c20464e3be38c64cd -
|
||||
CSVWithNames, false
|
||||
e986f353467c87b07e7143d7bff2daff -
|
||||
1610d7eac24fb923cd973c99ab7e3a8d -
|
||||
CSVWithNames, true
|
||||
e986f353467c87b07e7143d7bff2daff -
|
||||
1610d7eac24fb923cd973c99ab7e3a8d -
|
||||
|
@ -10,10 +10,10 @@ for format in "${FORMATS[@]}"
|
||||
do
|
||||
echo "$format, false";
|
||||
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=false -q \
|
||||
"SELECT ClientEventTime::DateTime('Europe/Moscow') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c Format $format" | md5sum
|
||||
"SELECT ClientEventTime::DateTime('Asia/Dubai') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c Format $format" | md5sum
|
||||
|
||||
echo "$format, true";
|
||||
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=true -q \
|
||||
"SELECT ClientEventTime::DateTime('Europe/Moscow') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c Format $format" | md5sum
|
||||
"SELECT ClientEventTime::DateTime('Asia/Dubai') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c Format $format" | md5sum
|
||||
done
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
TSV, false
|
||||
6e4ce4996dd0e036d27cb0d2166c8e59 -
|
||||
9e0a1b1db4d1e56b4b571a8824dde35b -
|
||||
TSV, true
|
||||
6e4ce4996dd0e036d27cb0d2166c8e59 -
|
||||
9e0a1b1db4d1e56b4b571a8824dde35b -
|
||||
CSV, false
|
||||
ab6b3616f31e8a952c802ca92562e418 -
|
||||
c9c6f633a59d349f9f8a14ee2f1cb1b3 -
|
||||
CSV, true
|
||||
ab6b3616f31e8a952c802ca92562e418 -
|
||||
c9c6f633a59d349f9f8a14ee2f1cb1b3 -
|
||||
JSONCompactEachRow, false
|
||||
1651b540b43bd6c62446f4c340bf13c7 -
|
||||
826e244bd6c547b52955dd69df61ea22 -
|
||||
JSONCompactEachRow, true
|
||||
1651b540b43bd6c62446f4c340bf13c7 -
|
||||
826e244bd6c547b52955dd69df61ea22 -
|
||||
|
@ -10,8 +10,8 @@ FORMATS=('TSV' 'CSV' 'JSONCompactEachRow')
|
||||
for format in "${FORMATS[@]}"
|
||||
do
|
||||
echo "$format, false";
|
||||
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=SELECT+ClientEventTime::DateTime('Europe/Moscow')+as+a,MobilePhoneModel+as+b,ClientIP6+as+c+FROM+test.hits+ORDER+BY+a,b,c+LIMIT+1000000+Format+$format&output_format_parallel_formatting=false" -d' ' | md5sum
|
||||
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=SELECT+ClientEventTime::DateTime('Asia/Dubai')+as+a,MobilePhoneModel+as+b,ClientIP6+as+c+FROM+test.hits+ORDER+BY+a,b,c+LIMIT+1000000+Format+$format&output_format_parallel_formatting=false" -d' ' | md5sum
|
||||
|
||||
echo "$format, true";
|
||||
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=SELECT+ClientEventTime::DateTime('Europe/Moscow')+as+a,MobilePhoneModel+as+b,ClientIP6+as+c+FROM+test.hits+ORDER+BY+a,b,c+LIMIT+1000000+Format+$format&output_format_parallel_formatting=true" -d' ' | md5sum
|
||||
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=SELECT+ClientEventTime::DateTime('Asia/Dubai')+as+a,MobilePhoneModel+as+b,ClientIP6+as+c+FROM+test.hits+ORDER+BY+a,b,c+LIMIT+1000000+Format+$format&output_format_parallel_formatting=true" -d' ' | md5sum
|
||||
done
|
||||
|
@ -1,28 +1,28 @@
|
||||
JSONEachRow, false
|
||||
e0a3c9978a92a277f2fff4664f3c1749 -
|
||||
c6b89185cc5b3dff5d3779e2e1551b81 -
|
||||
JSONEachRow, true
|
||||
e0a3c9978a92a277f2fff4664f3c1749 -
|
||||
c6b89185cc5b3dff5d3779e2e1551b81 -
|
||||
JSONCompactEachRow, false
|
||||
0c1efbbc25a5bd90a2ecea559d283667 -
|
||||
5c838a00e22d943fa429c45106b7ff4d -
|
||||
JSONCompactEachRow, true
|
||||
0c1efbbc25a5bd90a2ecea559d283667 -
|
||||
5c838a00e22d943fa429c45106b7ff4d -
|
||||
JSONCompactStringsEachRow, false
|
||||
0c1efbbc25a5bd90a2ecea559d283667 -
|
||||
5c838a00e22d943fa429c45106b7ff4d -
|
||||
JSONCompactStringsEachRow, true
|
||||
0c1efbbc25a5bd90a2ecea559d283667 -
|
||||
5c838a00e22d943fa429c45106b7ff4d -
|
||||
JSONCompactEachRowWithNames, false
|
||||
b9e4f8ecadbb650245d1762f4187ee0a -
|
||||
e3231b1c8187de4da6752d692b2ddba9 -
|
||||
JSONCompactEachRowWithNames, true
|
||||
b9e4f8ecadbb650245d1762f4187ee0a -
|
||||
e3231b1c8187de4da6752d692b2ddba9 -
|
||||
JSONCompactStringsEachRowWithNames, false
|
||||
b9e4f8ecadbb650245d1762f4187ee0a -
|
||||
e3231b1c8187de4da6752d692b2ddba9 -
|
||||
JSONCompactStringsEachRowWithNames, true
|
||||
b9e4f8ecadbb650245d1762f4187ee0a -
|
||||
e3231b1c8187de4da6752d692b2ddba9 -
|
||||
JSONCompactEachRowWithNamesAndTypes, false
|
||||
8b41f7375999b53d4c9607398456fe5b -
|
||||
21302d11da0bf8d37ab599e28a51bac2 -
|
||||
JSONCompactEachRowWithNamesAndTypes, true
|
||||
8b41f7375999b53d4c9607398456fe5b -
|
||||
21302d11da0bf8d37ab599e28a51bac2 -
|
||||
JSONCompactStringsEachRowWithNamesAndTypes, false
|
||||
8b41f7375999b53d4c9607398456fe5b -
|
||||
21302d11da0bf8d37ab599e28a51bac2 -
|
||||
JSONCompactStringsEachRowWithNamesAndTypes, true
|
||||
8b41f7375999b53d4c9607398456fe5b -
|
||||
21302d11da0bf8d37ab599e28a51bac2 -
|
||||
|
@ -12,9 +12,9 @@ for format in "${FORMATS[@]}"
|
||||
do
|
||||
echo "$format, false";
|
||||
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=false -q \
|
||||
"SELECT ClientEventTime::DateTime('Europe/Moscow') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c LIMIT 3000000 Format $format" | md5sum
|
||||
"SELECT ClientEventTime::DateTime('Asia/Dubai') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c LIMIT 3000000 Format $format" | md5sum
|
||||
|
||||
echo "$format, true";
|
||||
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=true -q \
|
||||
"SELECT ClientEventTime::DateTime('Europe/Moscow') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c LIMIT 3000000 Format $format" | md5sum
|
||||
"SELECT ClientEventTime::DateTime('Asia/Dubai') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c LIMIT 3000000 Format $format" | md5sum
|
||||
done
|
||||
|
@ -1,12 +1,12 @@
|
||||
TSV, false
|
||||
8a984bbbfb127c430f67173f5371c6cb -
|
||||
194d5061de4cae59489d989373f8effe -
|
||||
TSV, true
|
||||
8a984bbbfb127c430f67173f5371c6cb -
|
||||
194d5061de4cae59489d989373f8effe -
|
||||
TSVWithNames, false
|
||||
ead321ed96754ff1aa39d112bc28c43d -
|
||||
a6d327a3611288b3f973d00e6116f16e -
|
||||
TSVWithNames, true
|
||||
ead321ed96754ff1aa39d112bc28c43d -
|
||||
a6d327a3611288b3f973d00e6116f16e -
|
||||
TSKV, false
|
||||
1735308ecea5c269846f36a55d5b335f -
|
||||
c2e32a21c08aacf60bda21248ce4f73f -
|
||||
TSKV, true
|
||||
1735308ecea5c269846f36a55d5b335f -
|
||||
c2e32a21c08aacf60bda21248ce4f73f -
|
||||
|
@ -11,9 +11,9 @@ for format in "${FORMATS[@]}"
|
||||
do
|
||||
echo "$format, false";
|
||||
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=false -q \
|
||||
"SELECT ClientEventTime::DateTime('Europe/Moscow') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c Format $format" | md5sum
|
||||
"SELECT ClientEventTime::DateTime('Asia/Dubai') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c Format $format" | md5sum
|
||||
|
||||
echo "$format, true";
|
||||
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=true -q \
|
||||
"SELECT ClientEventTime::DateTime('Europe/Moscow') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c Format $format" | md5sum
|
||||
"SELECT ClientEventTime::DateTime('Asia/Dubai') as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c Format $format" | md5sum
|
||||
done
|
||||
|
@ -1,8 +1,8 @@
|
||||
TSVWithNames, false
|
||||
29caf86494f169d6339f6c5610b20731 -
|
||||
0c6d493d47ff0aa1c6111c40c2b6cfcf -
|
||||
TSVWithNames, true
|
||||
29caf86494f169d6339f6c5610b20731 -
|
||||
0c6d493d47ff0aa1c6111c40c2b6cfcf -
|
||||
CSVWithNames, false
|
||||
29caf86494f169d6339f6c5610b20731 -
|
||||
0c6d493d47ff0aa1c6111c40c2b6cfcf -
|
||||
CSVWithNames, true
|
||||
29caf86494f169d6339f6c5610b20731 -
|
||||
0c6d493d47ff0aa1c6111c40c2b6cfcf -
|
||||
|
@ -10,21 +10,21 @@ $CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS parsing_with_names"
|
||||
for format in "${FORMATS[@]}"
|
||||
do
|
||||
# Columns are permuted
|
||||
$CLICKHOUSE_CLIENT -q "CREATE TABLE parsing_with_names(c FixedString(16), a DateTime('Europe/Moscow'), b String) ENGINE=Memory()"
|
||||
$CLICKHOUSE_CLIENT -q "CREATE TABLE parsing_with_names(c FixedString(16), a DateTime('Asia/Dubai'), b String) ENGINE=Memory()"
|
||||
|
||||
echo "$format, false";
|
||||
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=false -q \
|
||||
"SELECT URLRegions as d, toTimeZone(ClientEventTime, 'Europe/Moscow') as a, MobilePhoneModel as b, ParamPrice as e, ClientIP6 as c FROM test.hits LIMIT 50000 Format $format" | \
|
||||
"SELECT URLRegions as d, toTimeZone(ClientEventTime, 'Asia/Dubai') as a, MobilePhoneModel as b, ParamPrice as e, ClientIP6 as c FROM test.hits LIMIT 50000 Format $format" | \
|
||||
$CLICKHOUSE_CLIENT --input_format_skip_unknown_fields=1 --input_format_parallel_parsing=false -q "INSERT INTO parsing_with_names FORMAT $format"
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "SELECT * FROM parsing_with_names;" | md5sum
|
||||
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS parsing_with_names"
|
||||
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "CREATE TABLE parsing_with_names(c FixedString(16), a DateTime('Europe/Moscow'), b String) ENGINE=Memory()"
|
||||
$CLICKHOUSE_CLIENT -q "CREATE TABLE parsing_with_names(c FixedString(16), a DateTime('Asia/Dubai'), b String) ENGINE=Memory()"
|
||||
echo "$format, true";
|
||||
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=false -q \
|
||||
"SELECT URLRegions as d, toTimeZone(ClientEventTime, 'Europe/Moscow') as a, MobilePhoneModel as b, ParamPrice as e, ClientIP6 as c FROM test.hits LIMIT 50000 Format $format" | \
|
||||
"SELECT URLRegions as d, toTimeZone(ClientEventTime, 'Asia/Dubai') as a, MobilePhoneModel as b, ParamPrice as e, ClientIP6 as c FROM test.hits LIMIT 50000 Format $format" | \
|
||||
$CLICKHOUSE_CLIENT --input_format_skip_unknown_fields=1 --input_format_parallel_parsing=true -q "INSERT INTO parsing_with_names FORMAT $format"
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "SELECT * FROM parsing_with_names;" | md5sum
|
||||
|
@ -1,12 +1,12 @@
|
||||
Parquet
|
||||
6b397d4643bc1f920f3eb8aa87ee180c -
|
||||
093d0270733e505af52436f9df4a779f -
|
||||
7fe6d8c57ddc5fe37bbdcb7f73c5fa78 -
|
||||
d8746733270cbeff7ab3550c9b944fb6 -
|
||||
Arrow
|
||||
6b397d4643bc1f920f3eb8aa87ee180c -
|
||||
093d0270733e505af52436f9df4a779f -
|
||||
7fe6d8c57ddc5fe37bbdcb7f73c5fa78 -
|
||||
d8746733270cbeff7ab3550c9b944fb6 -
|
||||
ORC
|
||||
6b397d4643bc1f920f3eb8aa87ee180c -
|
||||
093d0270733e505af52436f9df4a779f -
|
||||
7fe6d8c57ddc5fe37bbdcb7f73c5fa78 -
|
||||
d8746733270cbeff7ab3550c9b944fb6 -
|
||||
|
@ -11,7 +11,7 @@ for format in "${FORMATS[@]}"
|
||||
do
|
||||
echo $format
|
||||
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS 00163_column_oriented SYNC"
|
||||
$CLICKHOUSE_CLIENT -q "CREATE TABLE 00163_column_oriented(ClientEventTime DateTime('Europe/Moscow'), MobilePhoneModel String, ClientIP6 FixedString(16)) ENGINE=File($format)"
|
||||
$CLICKHOUSE_CLIENT -q "CREATE TABLE 00163_column_oriented(ClientEventTime DateTime('Asia/Dubai'), MobilePhoneModel String, ClientIP6 FixedString(16)) ENGINE=File($format)"
|
||||
$CLICKHOUSE_CLIENT -q "INSERT INTO 00163_column_oriented SELECT ClientEventTime, MobilePhoneModel, ClientIP6 FROM test.hits ORDER BY ClientEventTime, MobilePhoneModel, ClientIP6 LIMIT 100"
|
||||
$CLICKHOUSE_CLIENT -q "SELECT ClientEventTime from 00163_column_oriented" | md5sum
|
||||
$CLICKHOUSE_CLIENT -q "SELECT MobilePhoneModel from 00163_column_oriented" | md5sum
|
||||
|
@ -1,20 +1,20 @@
|
||||
TSVWithNamesAndTypes, false
|
||||
7c1feeaae418e502d66fcc8e31946f2e -
|
||||
0bd9fe2bc50147cd260bb58457329385 -
|
||||
TSVWithNamesAndTypes, true
|
||||
7c1feeaae418e502d66fcc8e31946f2e -
|
||||
0bd9fe2bc50147cd260bb58457329385 -
|
||||
CSVWithNamesAndTypes, false
|
||||
7c1feeaae418e502d66fcc8e31946f2e -
|
||||
0bd9fe2bc50147cd260bb58457329385 -
|
||||
CSVWithNamesAndTypes, true
|
||||
7c1feeaae418e502d66fcc8e31946f2e -
|
||||
0bd9fe2bc50147cd260bb58457329385 -
|
||||
JSONStringsEachRow, false
|
||||
7c1feeaae418e502d66fcc8e31946f2e -
|
||||
0bd9fe2bc50147cd260bb58457329385 -
|
||||
JSONStringsEachRow, true
|
||||
7c1feeaae418e502d66fcc8e31946f2e -
|
||||
0bd9fe2bc50147cd260bb58457329385 -
|
||||
JSONCompactEachRowWithNamesAndTypes, false
|
||||
7c1feeaae418e502d66fcc8e31946f2e -
|
||||
0bd9fe2bc50147cd260bb58457329385 -
|
||||
JSONCompactEachRowWithNamesAndTypes, true
|
||||
7c1feeaae418e502d66fcc8e31946f2e -
|
||||
0bd9fe2bc50147cd260bb58457329385 -
|
||||
JSONCompactStringsEachRowWithNamesAndTypes, false
|
||||
7c1feeaae418e502d66fcc8e31946f2e -
|
||||
0bd9fe2bc50147cd260bb58457329385 -
|
||||
JSONCompactStringsEachRowWithNamesAndTypes, true
|
||||
7c1feeaae418e502d66fcc8e31946f2e -
|
||||
0bd9fe2bc50147cd260bb58457329385 -
|
||||
|
@ -10,21 +10,21 @@ $CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS parsing_with_names"
|
||||
for format in "${FORMATS[@]}"
|
||||
do
|
||||
# Columns are permuted
|
||||
$CLICKHOUSE_CLIENT -q "CREATE TABLE parsing_with_names(c FixedString(16), a DateTime('Europe/Moscow'), b String) ENGINE=Memory()"
|
||||
$CLICKHOUSE_CLIENT -q "CREATE TABLE parsing_with_names(c FixedString(16), a DateTime('Asia/Dubai'), b String) ENGINE=Memory()"
|
||||
|
||||
echo "$format, false";
|
||||
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=false -q \
|
||||
"SELECT URLRegions as d, toTimeZone(ClientEventTime, 'Europe/Moscow') as a, MobilePhoneModel as b, ParamPrice as e, ClientIP6 as c FROM test.hits LIMIT 5000 Format $format" | \
|
||||
"SELECT URLRegions as d, toTimeZone(ClientEventTime, 'Asia/Dubai') as a, MobilePhoneModel as b, ParamPrice as e, ClientIP6 as c FROM test.hits LIMIT 5000 Format $format" | \
|
||||
$CLICKHOUSE_CLIENT --input_format_skip_unknown_fields=1 --input_format_parallel_parsing=false -q "INSERT INTO parsing_with_names FORMAT $format SETTINGS input_format_null_as_default=0"
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "SELECT * FROM parsing_with_names;" | md5sum
|
||||
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS parsing_with_names"
|
||||
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "CREATE TABLE parsing_with_names(c FixedString(16), a DateTime('Europe/Moscow'), b String) ENGINE=Memory()"
|
||||
$CLICKHOUSE_CLIENT -q "CREATE TABLE parsing_with_names(c FixedString(16), a DateTime('Asia/Dubai'), b String) ENGINE=Memory()"
|
||||
echo "$format, true";
|
||||
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=false -q \
|
||||
"SELECT URLRegions as d, toTimeZone(ClientEventTime, 'Europe/Moscow') as a, MobilePhoneModel as b, ParamPrice as e, ClientIP6 as c FROM test.hits LIMIT 5000 Format $format" | \
|
||||
"SELECT URLRegions as d, toTimeZone(ClientEventTime, 'Asia/Dubai') as a, MobilePhoneModel as b, ParamPrice as e, ClientIP6 as c FROM test.hits LIMIT 5000 Format $format" | \
|
||||
$CLICKHOUSE_CLIENT --input_format_skip_unknown_fields=1 --input_format_parallel_parsing=true -q "INSERT INTO parsing_with_names FORMAT $format SETTINGS input_format_null_as_default=0"
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "SELECT * FROM parsing_with_names;" | md5sum
|
||||
|
Loading…
Reference in New Issue
Block a user