diff --git a/dbms/tests/queries/0_stateless/01010_low_cardinality_and_native_http.reference b/dbms/tests/queries/0_stateless/01010_low_cardinality_and_native_http.reference new file mode 100644 index 00000000000..0589451d40c --- /dev/null +++ b/dbms/tests/queries/0_stateless/01010_low_cardinality_and_native_http.reference @@ -0,0 +1,4 @@ +abc +---- +abc +abc diff --git a/dbms/tests/queries/0_stateless/01010_low_cardinality_and_native_http.sh b/dbms/tests/queries/0_stateless/01010_low_cardinality_and_native_http.sh new file mode 100755 index 00000000000..a3149294c40 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01010_low_cardinality_and_native_http.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +. $CURDIR/../shell_config.sh + + +$CLICKHOUSE_CLIENT --query="drop table if exists tab_str"; +$CLICKHOUSE_CLIENT --query="drop table if exists tab_str_lc"; + +$CLICKHOUSE_CLIENT --query="create table tab_str (x String) engine = MergeTree order by tuple()"; +$CLICKHOUSE_CLIENT --query="create table tab_str_lc (x LowCardinality(String)) engine = MergeTree order by tuple()"; +$CLICKHOUSE_CLIENT --query="insert into tab_str values ('abc')"; + +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL_PARAMS}&query=select+x+from+tab_str+format+Native" | ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL_PARAMS}&query=INSERT+INTO+tab_str_lc+FORMAT+Native" --data-binary @- + +$CLICKHOUSE_CLIENT --query="select x from tab_str_lc"; + +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL_PARAMS}&query=select+x+from+tab_str_lc+format+Native" | ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL_PARAMS}&query=INSERT+INTO+tab_str+FORMAT+Native" --data-binary @- + +$CLICKHOUSE_CLIENT --query="select '----'"; +$CLICKHOUSE_CLIENT --query="select x from tab_str";