2020-07-03 11:45:57 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-11-21 10:58:26 +00:00
|
|
|
# Tags: no-fasttest
|
2020-07-03 11:45:57 +00:00
|
|
|
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2020-12-28 11:46:53 +00:00
|
|
|
# shellcheck source=../shell_config.sh
|
2020-08-01 00:51:12 +00:00
|
|
|
. "$CURDIR"/../shell_config.sh
|
2020-07-03 11:45:57 +00:00
|
|
|
|
|
|
|
$CLICKHOUSE_CLIENT -q "drop table if exists test_lc"
|
|
|
|
$CLICKHOUSE_CLIENT -q "drop table if exists test"
|
|
|
|
$CLICKHOUSE_CLIENT -q "create table test (a String) Engine = MergeTree order by tuple()"
|
|
|
|
$CLICKHOUSE_CLIENT -q "create table test_lc (a LowCardinality(String)) Engine = MergeTree order by tuple()"
|
|
|
|
$CLICKHOUSE_CLIENT -q "select 'abc' as a format Parquet" | $CLICKHOUSE_CLIENT -q "insert into test_lc format Parquet"
|
|
|
|
$CLICKHOUSE_CLIENT -q "select a from test_lc format Parquet" | $CLICKHOUSE_CLIENT -q "insert into test format Parquet"
|
|
|
|
$CLICKHOUSE_CLIENT -q "select a from test order by a"
|
|
|
|
$CLICKHOUSE_CLIENT -q "drop table if exists test_lc"
|
|
|
|
$CLICKHOUSE_CLIENT -q "drop table if exists test"
|
|
|
|
|
|
|
|
$CLICKHOUSE_CLIENT -q "drop table if exists test_lc"
|
|
|
|
$CLICKHOUSE_CLIENT -q "drop table if exists test"
|
|
|
|
$CLICKHOUSE_CLIENT -q "create table test (a Nullable(String)) Engine = MergeTree order by tuple()"
|
|
|
|
$CLICKHOUSE_CLIENT -q "create table test_lc (a LowCardinality(Nullable(String))) Engine = MergeTree order by tuple()"
|
|
|
|
$CLICKHOUSE_CLIENT -q "select 'ghi' as a format Parquet" | $CLICKHOUSE_CLIENT -q "insert into test_lc format Parquet"
|
|
|
|
$CLICKHOUSE_CLIENT -q "select cast(Null as Nullable(String)) as a format Parquet" | $CLICKHOUSE_CLIENT -q "insert into test_lc format Parquet"
|
|
|
|
$CLICKHOUSE_CLIENT -q "select a from test_lc format Parquet" | $CLICKHOUSE_CLIENT -q "insert into test format Parquet"
|
|
|
|
$CLICKHOUSE_CLIENT -q "select a from test order by a"
|
|
|
|
$CLICKHOUSE_CLIENT -q "drop table if exists test_lc"
|
|
|
|
$CLICKHOUSE_CLIENT -q "drop table if exists test"
|