add tests

This commit is contained in:
Nikita Mikhailov 2020-12-30 00:04:39 +03:00
parent 2b90b4e01d
commit 107360fc77
8 changed files with 114 additions and 0 deletions

View File

@ -0,0 +1,8 @@
CSV, false
ea1c740f03f5dcc43a3044528ad0a98f -
CSV, true
ea1c740f03f5dcc43a3044528ad0a98f -
CSVWithNames, false
e986f353467c87b07e7143d7bff2daff -
CSVWithNames, true
e986f353467c87b07e7143d7bff2daff -

View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. "$CURDIR"/../shell_config.sh
FORMATS=('CSV' 'CSVWithNames')
for format in "${FORMATS[@]}"
do
echo "$format, false";
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=false -q \
"SELECT ClientEventTime 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 as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c Format $format" | md5sum
done

View File

@ -0,0 +1,12 @@
TSV, false
8a984bbbfb127c430f67173f5371c6cb -
TSV, true
8a984bbbfb127c430f67173f5371c6cb -
CSV, false
ea1c740f03f5dcc43a3044528ad0a98f -
CSV, true
ea1c740f03f5dcc43a3044528ad0a98f -
JSONCompactEachRow, false
ba1081a754a06ef6563840b2d8d4d327 -
JSONCompactEachRow, true
ba1081a754a06ef6563840b2d8d4d327 -

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. "$CURDIR"/../shell_config.sh
FORMATS=('TSV' 'CSV' 'JSONCompactEachRow')
for format in "${FORMATS[@]}"
do
echo "$format, false";
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=SELECT+ClientEventTime+as+a,MobilePhoneModel+as+b,ClientIP6+as+c+FROM+test.hits+ORDER+BY+a,b,c+Format+$format&output_format_parallel_formatting=false" -d' ' | md5sum
echo "$format, true";
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=SELECT+ClientEventTime+as+a,MobilePhoneModel+as+b,ClientIP6+as+c+FROM+test.hits+ORDER+BY+a,b,c+Format+$format&output_format_parallel_formatting=true" -d' ' | md5sum
done

View File

@ -0,0 +1,12 @@
JSONEachRow, false
7251839681e559f5a92db107571bb357 -
JSONEachRow, true
7251839681e559f5a92db107571bb357 -
JSONCompactEachRow, false
ba1081a754a06ef6563840b2d8d4d327 -
JSONCompactEachRow, true
ba1081a754a06ef6563840b2d8d4d327 -
JSONCompactStringsEachRowWithNamesAndTypes, false
902e53f621d5336aa7f702a5d6b64b42 -
JSONCompactStringsEachRowWithNamesAndTypes, true
902e53f621d5336aa7f702a5d6b64b42 -

View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. "$CURDIR"/../shell_config.sh
FORMATS=('JSONEachRow' 'JSONCompactEachRow' 'JSONCompactStringsEachRowWithNamesAndTypes')
for format in "${FORMATS[@]}"
do
echo "$format, false";
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=false -q \
"SELECT ClientEventTime 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 as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c Format $format" | md5sum
done

View File

@ -0,0 +1,12 @@
TSV, false
8a984bbbfb127c430f67173f5371c6cb -
TSV, true
8a984bbbfb127c430f67173f5371c6cb -
TSVWithNames, false
ead321ed96754ff1aa39d112bc28c43d -
TSVWithNames, true
ead321ed96754ff1aa39d112bc28c43d -
TSKV, false
1735308ecea5c269846f36a55d5b335f -
TSKV, true
1735308ecea5c269846f36a55d5b335f -

View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. "$CURDIR"/../shell_config.sh
FORMATS=('TSV' 'TSVWithNames' 'TSKV')
for format in "${FORMATS[@]}"
do
echo "$format, false";
$CLICKHOUSE_CLIENT --output_format_parallel_formatting=false -q \
"SELECT ClientEventTime 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 as a, MobilePhoneModel as b, ClientIP6 as c FROM test.hits ORDER BY a, b, c Format $format" | md5sum
done