mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
test
This commit is contained in:
parent
cbcc7482ff
commit
6ba5cf289c
11
dbms/tests/queries/0_stateless/01035_avg_weighted.sh
Executable file
11
dbms/tests/queries/0_stateless/01035_avg_weighted.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
|
. $CUR_DIR/../shell_config.sh
|
||||||
|
|
||||||
|
|
||||||
|
${CLICKHOUSE_CLIENT} --query="SELECT avgWeighted(x, weight) FROM (SELECT t.1 AS x, t.2 AS weight FROM (SELECT arrayJoin([(1, 5), (2, 4), (3, 3), (4, 2), (5, 1)]) AS t));"
|
||||||
|
${CLICKHOUSE_CLIENT} --query="SELECT avgWeighted(x, weight) FROM (SELECT t.1 AS x, t.2 AS weight FROM (SELECT arrayJoin([(1, 0), (2, 0), (3, 0), (4, 0), (5, 0)]) AS t));"
|
||||||
|
|
||||||
|
echo `${CLICKHOUSE_CLIENT} --server_logs_file=/dev/null --query="SELECT avgWeighted(toDecimal64(0, 0), toFloat64(0))" 2>&1` \
|
||||||
|
| grep -c 'Code: 43. DB::Exception: .* DB::Exception:.* Different types .* of argument for aggregate function avgWeighted'
|
Loading…
Reference in New Issue
Block a user