ClickHouse/tests/queries/0_stateless/02142_http_with_query_parameters.sh

16 lines
505 B
Bash
Raw Normal View History

2021-12-14 20:04:40 +00:00
#!/usr/bin/env bash
set -e
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
echo '
SELECT
sum(toUInt8(1) ? toUInt8(1) : toUInt8(1)) AS metric,
groupArray(toUInt8(1) ? toUInt8(1) : toUInt8(1)),
groupArray(toUInt8(1) ? toUInt8(1) : 1),
sum(toUInt8(1) ? toUInt8(1) : 1)
FROM (SELECT materialize(toUInt64(1)) as key FROM numbers(22))
WHERE key = {b1:Int64}' | ${CLICKHOUSE_CURL} -sSg "${CLICKHOUSE_URL}&param_b1=1" -d @-