ClickHouse/tests/queries/0_stateless/02303_query_kind.sh
Azat Khuzhin 29a8a00656 Add ability to pass QueryKind via clickhouse-client/local (useful for debugging)
v2: fix LocalConnection::sendQuery() for Suggest (comes w/o client_info) [1]
    [1]: https://s3.amazonaws.com/clickhouse-test-reports/37290/7c85175963226ff78eec542efafcff4e650aa0f0/stateless_tests__ubsan__actions_.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-19 07:19:27 +03:00

17 lines
547 B
Bash
Executable File

#!/usr/bin/env bash
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
function run_query()
{
echo "clickhouse-client $*"
$CLICKHOUSE_CLIENT "$@"
echo "clickhouse-local $*"
$CLICKHOUSE_LOCAL "$@"
}
run_query --query_kind secondary_query -q "explain plan header=1 select toString(dummy) as dummy from system.one group by dummy"
run_query --query_kind initial_query -q "explain plan header=1 select toString(dummy) as dummy from system.one group by dummy"